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
(34)

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)
4.9/5
(36)

Which of the following is not a valid Java comment?

(Multiple Choice)
4.7/5
(35)

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

(True/False)
4.9/5
(41)

Variables are classified according to their

(Multiple Choice)
4.8/5
(31)

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

(Multiple Choice)
4.9/5
(44)

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

(True/False)
4.8/5
(41)

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
(42)

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

(True/False)
4.7/5
(30)

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

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.8/5
(43)

A Java program must have at least one

(Multiple Choice)
4.9/5
(40)

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

(Multiple Choice)
4.7/5
(36)

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

(Multiple Choice)
4.8/5
(30)

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
(33)

Which Scanner class method reads a String?

(Multiple Choice)
4.8/5
(41)

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
(43)

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
(40)

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

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
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)