1Z0-808: Java SE 8 Programmer I practice questions, page 7 of 10, with answer review and explanations.
Question 31
Which three are advantages of the Java exception mechanism? (Choose three.)
Improves the program structure because the error handling code is separated from the normal program function
Provides a set of standard exceptions that covers all possible errors
Improves the program structure because the programmer can choose where to handle exceptions
Improves the program structure because exceptions must be handled in the method in which they occurred
Allows the creation of new exceptions that are customized to the particular program being created
Question 32
Given the code from the Greeting.Java file: Which set of commands prints Hello Duke in the console?
Option A
Option B
Option C
Option D
Question 33
Given: And: What is the result?
Option A
Option B
Option C
Option D
Question 34
Given the code fragment: What is the result?
2 4
0 2 4 6
0 2 4
Compilation fails
Question 35
Given the code fragment: Assume that the system date is June 20, 2014. What is the result? A. B. C. Compilation fails. D. An exception is thrown at runtime.