import java.util.*; import java.lang.*; public class StudentCollection { public static void iterateCollection(Collection students) { for(Student st: students) { System.out.println(st.toString()); } } public static void main(String args[]) { Collection students; students = new LinkedList(); students.add(new Student("John", "Smith")); students.add(new Student("Stanley", "Peters")); students.add(new Student("Edgar", "Bloch")); students.add(new Student("Suzan", "Miles")); students.add(new Student("Mary", "Poppins")); iterateCollection(students); } }