I got this from javabeat.net
35)What is the correct option for questions mark?
List<
String> arr[] = ?
a)new ArrayList();
b)new ArrayList<String>();
c)new ArrayList[10];
d)null;
e)new ArrayList<Object>();
Ans 35)C and D
Explanation:
Since the Reference is of type Array, it will hold only array declaration of List (or) its
subtype
Is this valid question, because as far as i know we cannot create array have comonenents of generic class.
Kindly clear my doubt.