Exam 2: Java Fundamentals

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

Which of the following statements is invalid?

(Multiple Choice)
4.7/5
(34)

Which of the following statements correctly creates a Scanner object for keyboard input?

(Multiple Choice)
4.9/5
(35)

Both character and string literals can be assigned to a char variable.

(True/False)
4.8/5
(48)

The boolean data type may contain which of the following range of values?

(Multiple Choice)
4.9/5
(42)

If you want to use the System.out.printf method to print a string argument , use the __________ format specifier.

(Multiple Choice)
5.0/5
(39)

What is the value of z after the following code is executed? int x = 5, y = 28; Float z; Z = (float) (y / x);

(Multiple Choice)
4.7/5
(40)

A message dialog is a quick and simple way to ask the user to enter data.

(True/False)
4.9/5
(42)

Variables of the boolean data type are useful for

(Multiple Choice)
4.9/5
(34)

Which of the following is not a rule that must be followed when naming identifiers?

(Multiple Choice)
4.8/5
(42)

What would be displayed as a result of executing the following code? int x = 15, y = 20, z = 32; X += 12; Y /= 6; Z -= 14; System.out.println("x = " + x + ", y = " + y + ", z = " + z);

(Multiple Choice)
4.9/5
(38)

Which statement tells the compiler where to find the JOptionPane class and makes it available to your program?

(Multiple Choice)
4.8/5
(37)

A(n) __________ is a dialog box that prompts the user for input.

(Multiple Choice)
4.8/5
(37)

If you use a flag in a format specifier, you must write the flag before the field width and the precision.

(True/False)
4.7/5
(32)

Programming style includes techniques for consistently putting spaces and indentation in a program to help create visual cues.

(True/False)
4.9/5
(34)

Variables are classified according to their

(Multiple Choice)
4.8/5
(40)

What is the value of z after the following statements have been executed? int x = 4, y = 33; Double z; Z = (double) (y / x);

(Multiple Choice)
4.8/5
(41)

To print "Hello, world" on the monitor, which of the following Java statements should be used?

(Multiple Choice)
4.7/5
(32)

Which of the following is a named storage location in the computer's memory?

(Multiple Choice)
4.8/5
(33)

Which of the following is a value that is written into the code of a program?

(Multiple Choice)
4.9/5
(41)

A variable's scope is the part of the program that has access to that variable.

(True/False)
4.8/5
(37)
Showing 21 - 40 of 40
close modal

Filters

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