I want to know what kinds of reference can be array elements.
I know that there're primitive types like:
String[] strs = new String[5];
But there is no
List<String>[] stringList;
However, when I new a class, there is
Class Student{
String name;
List<String> courses;
}
Student[] students = new Student[5];
It says "The element type of an array may be any type, whether primitive or reference."
I think Student is reference and List<> is also reference. What's the difference between them?
Thanks.