1z0-829 Practice Test

1z0-829 Practice Test practice questions, page 3 of 4, with answer review and explanations.

Question 11

Given the code fragment: Which set of class definitions compiles?

  1. interface Story extends SInt {} interface Art extends SInt {}
  2. public interface Story extends SInt {} public interface Art extends SInt {}
  3. sealed interface Story extends SInt {} non-sealed class Art implements SInt {}
  4. non-sealed interface Story extends SInt {} non-sealed interface Art extends SInt {}
  5. non-sealed interface Story extends SInt {} class Art implements SInt {}

Question 12

Given: What is the result?

  1. mA
  2. mB mA
  3. mB
  4. mB mC

Question 13

Given the code fragment: What is the result?

  1. ABBCDE // the order of elements is unpredictable
  2. ABCDE
  3. ABCDE // the order of elements is unpredictable
  4. ADEABCB // the order of elements is unpredictable

Question 14

Given: What is the result?

  1. {bicycle=7, car=7, motorcycle=7, truck=7}
  2. {3:bicycle, 0:car, 6:motorcycle, 5:truck}
  3. Compilation fails.
  4. {bicycle=1, car=3, motorcycle=1, truck=2}
  5. {bicycle, car, motorcycle, truck}

Question 15

Which statement is true about modules?

  1. Only unnamed modules are on the module path.
  2. Automatic and named modules are on the module path.
  3. Only automatic modules are on the module path.
  4. Only named modules are on the module path.
  5. Automatic and unnamed modules are on the module path.