Exam 2: Console Input and Output

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The printf method can be used to output multiple formatted values.

Free
(True/False)
4.9/5
(28)
Correct Answer:
Verified

True

Echoing input is good programming practice because it can reveal problems in the input.

Free
(True/False)
4.9/5
(32)
Correct Answer:
Verified

True

What Java package includes the class Scanner?

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

D

Standard code libraries in Java are called:

(Multiple Choice)
4.8/5
(35)

Write a complete Java console application that prompts the user for two numbers,multiplies the numbers,and then displays the result to the user.

(Essay)
4.8/5
(45)

What is whitespace and why is it import when reading input from the keyboard using the Scanner class?

(Essay)
4.7/5
(33)

The Scanner class has a method next that allows an entire line of string text to be read.

(True/False)
4.7/5
(34)

The Java method printf is based on the ________ language.

(Multiple Choice)
4.9/5
(37)

Why is echoing user input a good programming practice?

(Essay)
4.8/5
(45)

Explain the significance of the pattern string used by the DecimalFormat object,and give an example of a valid pattern.

(Essay)
4.9/5
(37)

If there is no loss of efficiency in importing an entire Java package instead of importing only classes you use into your program,why would you not just import the entire package?

(Essay)
4.9/5
(45)

Which statement or group of statements produces the output: Java programming is fun!

(Multiple Choice)
4.7/5
(36)

Write a Java statement to display your name in the console window.

(Short Answer)
4.9/5
(40)

Write a Java program to create and display 57.32% using the DecimalFormat class.Include the necessary import statement to use the DecimalFormat class.

(Essay)
4.9/5
(33)

Write ONE Java statement to display your first and last name on two separate lines.

(Short Answer)
4.9/5
(41)

The method printf is used the same way as the method println but has the added feature that allows you to add formatting instructions.

(True/False)
4.7/5
(25)

If a hyphen is added after the % in a format specifier,the output will be _________.

(Multiple Choice)
4.9/5
(34)

Efficiency is lost in importing the entire package instead of importing the classes you use.

(True/False)
5.0/5
(42)

What does it mean to prompt the user?

(Essay)
4.8/5
(42)

The statement: System.out.printf("%6.2f",597.7231); displays:

(Multiple Choice)
4.9/5
(34)
Showing 1 - 20 of 29
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)