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)- A80% (47)
- B5% (3)
- D12% (7)
- E3% (2)
Community Discussion
No community discussion yet for this question.