Exam 2: Java Fundamentals

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

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);

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

D

Which of the following is valid?

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

C

Which of the following is not a valid comment statement?

Free
(Multiple Choice)
5.0/5
(34)
Correct Answer:
Verified

C

What would be printed out as a result of the following code? System.out.println("The quick brown fox" + "jumped over the \n" "slow moving hen.");

(Multiple Choice)
4.8/5
(33)

Programming style includes techniques for consistently putting spaces and indentation in a program so visual cues are created.

(True/False)
4.8/5
(39)

This is a named storage location in the computer's memory.

(Multiple Choice)
4.9/5
(34)

Java is a case-insensitive language.

(True/False)
4.9/5
(36)

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

(Multiple Choice)
4.9/5
(40)

If the compiler encounters a statement that uses a variable before the variable is declared, an error will result.

(True/False)
4.9/5
(36)

Variables are classified according to their

(Multiple Choice)
4.9/5
(34)

Every Java application program must have

(Multiple Choice)
4.9/5
(41)

If the following Java statements are executed, what will be displayed? System.out.println("The top three winners are\n"); System.out.print("Jody, the Giant\n"); System.out.print("Buffy, the Barbarian"); System.out.println("Adelle, the Alligator");

(Multiple Choice)
4.9/5
(35)

Variables of the boolean data type are useful for

(Multiple Choice)
4.8/5
(37)

Class names and key words are examples of variables.

(True/False)
4.9/5
(31)

In Java, it is standard practice to capitalize the first letter of:

(Multiple Choice)
4.9/5
(39)

What will be the displayed when the following code is executed? final int x = 22, y = 4; Y += x; System.out.println("x = " + x + ", y = " + y);

(Multiple Choice)
4.8/5
(32)

In Java the variable named total is the same as the variable named Total.

(True/False)
4.8/5
(40)

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

(Multiple Choice)
4.9/5
(42)

Which one of the following methods would you use to convert a string to a double?

(Multiple Choice)
4.8/5
(31)

What will be displayed after the following statements have been executed? final double x = 99.0; X = 54.3; System.out.println("x = " + x );

(Multiple Choice)
4.8/5
(47)
Showing 1 - 20 of 61
close modal

Filters

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