List<Student> students = new ArrayList<Student>(); Student foo = new Student(23, “Foo”, 22); students. add(foo); // This is how you add to a List (in this case a List of Student objects and more precisely an ArrayList of Students).
List<Student> students = new ArrayList<Student>(); Student foo = new Student(23, “Foo”, 22); students. add(foo); // This is how you add to a List (in this case a List of Student objects and more precisely an ArrayList of Students).