nerdexam
Oracle

1Z0-819 · Question #109

Which two statements inherently compile? (Choose two.)

The correct answer is A. List<? super Number> list = new ArrayList<Number>(); C. List<?> list = new ArrayList<Integer>(). See the full explanation below for the reasoning.

Question

Which two statements inherently compile? (Choose two.)

Options

  • AList<? super Number> list = new ArrayList<Number>();
  • BList<? super Number> list = new ArrayList<Integer>();
  • CList<?> list = new ArrayList<Integer>();
  • DList<? extends Number> list = new ArrayList<Object>();
  • EList<? super Float> list = new ArrayList<Double>();

How the community answered

(59 responses)
  • A
    80% (47)
  • B
    5% (3)
  • D
    12% (7)
  • E
    3% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-819 Practice