Multiple Choice
Which of the following code fragments will cause an error?
A) String greeting = "Hello, Dave!";
B) String greeting = "Hello, World!"; int n = greeting.length() ;
C) int luckyNumber; System.out.println(luckyNumber) ;
D) PrintStream printer = System.out;
Correct Answer:

Verified
Correct Answer:
Verified
Q19: Which operator constructs object instances?<br>A)new<br>B)instanceof<br>C)void<br>D)construct
Q33: Assuming the following Java statement: Circle c1
Q34: What is an object?<br>A)A sequence of instructions.<br>B)Any
Q35: A method name is _ if a
Q37: Assume that the variable count has been
Q41: The input to a method is called
Q42: What is a storage location in the
Q42: Which method checks whether a point lies
Q43: Based on the following code, which of
Q56: Which term is used to describe the