Exam 2: Java Fundamentals

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

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

(Multiple Choice)
4.8/5
(28)

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

(Multiple Choice)
4.7/5
(37)

The term ___________ typically refers to the device that displays console output.

(Multiple Choice)
4.9/5
(33)

This is a variable whose content is read only and cannot be changed during the program's execution.

(Multiple Choice)
4.9/5
(45)

The boolean data type may contain values in the following range of values

(Multiple Choice)
4.8/5
(37)

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

Character literals are enclosed in _____; string literals are enclosed in _____.

(Multiple Choice)
4.8/5
(37)

Although the dollar sign is a legal identifier character, you should not use it because it is normally used for special purposes.

(True/False)
5.0/5
(34)

Which Scanner class method reads an int?

(Multiple Choice)
4.9/5
(32)

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

(Multiple Choice)
4.8/5
(34)

All Java statements end with semicolons.

(True/False)
4.8/5
(38)

To compile a program named First, use the following command:

(Multiple Choice)
4.8/5
(41)

Which of the following is not a primitive data type?

(Multiple Choice)
4.8/5
(43)

Which of the following does not describe a valid comment in Java?

(Multiple Choice)
4.7/5
(40)

When the + operator is used with strings, it is known as the:

(Multiple Choice)
4.8/5
(35)

Which of the following is a valid Java statement?

(Multiple Choice)
4.8/5
(30)

Assuming that pay has been declared a double, the following statement is valid. pay = 2,583.44;

(True/False)
4.8/5
(32)

In Java, the beginning of a comment is marked with:

(Multiple Choice)
4.7/5
(32)

In Java, ___________ must be declared before they can be used.

(Multiple Choice)
4.9/5
(34)

A Java program must have at least one of these:

(Multiple Choice)
4.8/5
(32)
Showing 41 - 60 of 61
close modal

Filters

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