Identify two Java reserved words.
A. array
B. true
C. this
D. exception
E. string
Given the code fragment:
What is the result?
A. A compilation error occurs.
B. A runtime exception is thrown.
C. Julia Peter
D. Peter Julia
Given the code fragment:
What is the result?
A. 3
B. A compilation error occurs.
C. 2
D. 0
Given the code fragment: What is the result?
A. Selected null flavor.
B. Selected Chocolate flavor.
C. An ArrayIndexOutofBoundsException is thrown at run time.
D. Selected Chocolate flavor. Thank you!
Given the code fragment:
What is the result?
A. false false false false
B. true false false false
C. true true true true
D. true true true false
Given the code fragment:
What is the result?
A. 456789
B. 4567889
C. 45678
D. 3456789
Given the code fragment:
At which line does a compilation error occur?
A. lines 5 and 7
B. line 7
C. lines 6 and 8
D. line 5
Given the code fragment:
Which statement, when inserted at line n1, enables the code to print 0 2 4 6 8 10?
A. count = (count++) +1;
B. count = count++;
C. count =+ 2;
D. count += 2;
Identify three features of the Java programming language.
A. distributed
B. direct memory management
C. multithreaded
D. strongly typed
E. dynamically typed
Which two components can class declarations include?
A. A list of instance methods
B. The main method
C. Interfaces implemented by the class
D. The public modifier