Oracle
1Z0-804 · Question #148
Which two are valid initialization statements?
The correct answer is D. SortedMap<Object, Object> m = new TreeMap<Object, Object> (); F. Map<List, ArrayList> m = new Hashtable<List, ArrayList>(). See the full explanation below for the reasoning.
Question
Which two are valid initialization statements?
Options
- AMap<String, String> m = new SortedMap<String, String>();
- BCollection m = new TreeMap<Object, Object>();
- CHashMap<Object, Object> m = new SortedMap<Object, Object>();
- DSortedMap<Object, Object> m = new TreeMap<Object, Object> ();
- EHashtable m= new HashMap();
- FMap<List, ArrayList> m = new Hashtable<List, ArrayList>();
How the community answered
(28 responses)- B4% (1)
- C4% (1)
- D79% (22)
- E14% (4)
Community Discussion
No community discussion yet for this question.