+ 6

Type List vs type ArrayList in Java

List <?> mylis = new ArrayList <?> (); Can anyone please elaborate me this syntax in java. Is this is related to polymorphism? ------------------------------------------------------------------ What are the other options for HashMap in the below example ? For example Map <String , Integer> mymap = new HashMap <>();

8th Apr 2019, 8:52 PM
Aaditya Deshpande
Aaditya Deshpande - avatar
2 Answers