Which two are valid initialization statements?
A.
Map<String, String> m = newSortedMap<String, String>();
B.
Collection m = new TreeMap<Object, Object>();
C.
HashMap<Object, Object> m = newSortedMap<Object, Object>();
D.
SortedMap<Object, Object> m = new TreeMap<Object, Object> ();
E.
Hashtablem= new HashMap();
F.
Map<List, ArrayList> m = new Hashtable<List, ArrayList>();
Class Hashtable extends Dictionary implements Serializable, Cloneable, Map
Interface SortedMap extends Map
and Collections has no relationship with Map, they’re two different things
and Collection has no relationship with Map, they’re two different things
SortedMap is abstract, cannot be instatiated. It’s not A neather C.
The corrects ones are…
D and F
Tried it. It is D and F!