Exam 2: Java Fundamentals

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

The primitive data types only allow a(n) ________ to hold a single value.

(Multiple Choice)
4.9/5
(75)

What will be the value of z as a result of executing the following code? Int x = 5, y = 28; Float z; Z = (float) (y / x);

(Multiple Choice)
5.0/5
(82)

Which of the following is not a valid Java comment?

(Multiple Choice)
4.8/5
(73)

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

(True/False)
4.9/5
(98)

Variables are classified according to their

(Multiple Choice)
4.8/5
(72)

The simplest way you can use the System.out.printf method is

(Multiple Choice)
4.9/5
(82)

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

(True/False)
4.8/5
(90)

What will be 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.7/5
(86)

The System.out.printf method allows you to format output in a variety of ways.

(True/False)
4.8/5
(64)

To print "Hello, world" on the monitor, use the following Java statement:

(Multiple Choice)
5.0/5
(84)

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

(Multiple Choice)
4.8/5
(74)

A Java program must have at least one

(Multiple Choice)
4.9/5
(81)

What is the result of the following expression? 10 + 5 * 3 - 20

(Multiple Choice)
4.7/5
(87)

In the following Java statement what value is stored in the variable name? String name = "John Doe";

(Multiple Choice)
4.8/5
(71)

What would be displayed as a result of the following code? int x = 578; System.out.print("There are " + X + 5 + "\n" + "hens in the hen house.");

(Multiple Choice)
4.9/5
(80)

Which Scanner class method reads a String?

(Multiple Choice)
4.8/5
(76)

What output will be displayed as a result of executing the following code? Int x = 5, y = 20; X += 32; Y /= 4; System.out.println("x = " + x + ", y = " + y);

(Multiple Choice)
4.8/5
(83)

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

(True/False)
4.9/5
(85)

This is a value that is written into the code of a program.

(Multiple Choice)
4.9/5
(83)

This statement tells the compiler where to find the JOptionPane class and makes it available to your program.

(Multiple Choice)
4.8/5
(86)
Showing 21 - 40 of 40
close modal

Filters

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