1z0-808 Practice Test

Review 234 1Z0-808 practice questions with answer explanations and community insights.

Question 1

Given: What is the result?

  1. 200.0 : 100.0
  2. 400.0 : 200.0
  3. 400.0 : 100.0
  4. Compilation fails.

Question 2

Which statement is true about the switch statement?

  1. It must contain the default section.
  2. The break statement, at the end of each case block, is optional.
  3. Its case label literals can be changed at runtime.
  4. Its expression must evaluate to a collection of values.

Question 3

Given the code fragment: What is the result?

  1. May 04, 2014T00:00:00.000
  2. 2014-05-04T00:00: 00.000
  3. 5/4/14T00:00:00.000
  4. An exception is thrown at runtime.

Question 4

Given the code fragment: What is the result?

  1. Sum is 600
  2. Compilation fails at line n1.
  3. Compilation fails at line n2.
  4. A ClassCastException is thrown at line n1.
  5. A ClassCastException is thrown at line n2.

Question 5

What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?

  1. Encapsulation
  2. Inheritance
  3. Abstraction
  4. Instantiation
  5. Polymorphism