1z0-808 Practice Test

1z0-808 Practice Test practice questions, page 7 of 10, with answer review and explanations.

Question 31

Which three are advantages of the Java exception mechanism? (Choose three.)

  1. Improves the program structure because the error handling code is separated from the normal program function
  2. Provides a set of standard exceptions that covers all possible errors
  3. Improves the program structure because the programmer can choose where to handle exceptions
  4. Improves the program structure because exceptions must be handled in the method in which they occurred
  5. 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?

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Question 33

Given: And: What is the result?

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Question 34

Given the code fragment: What is the result?

  1. 2 4
  2. 0 2 4 6
  3. 0 2 4
  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.