Suppose my code goes like this:
ArrayList list = new ArrayList();
Student s = new Student(); // creating object of Student class
myList.add(s); // Here am confused ...
/* myList contains just the reference variable to the Student object, OR
myList contains the actual Student object (memory allocation for name, rollNo etc) ??
*/
In Short when adding objects to ArrayList using add():
ArrayList is a list of "References to objects" or its a list of "actual objects" ???