import java.util.*; import java.lang.*; import java.util.*; import java.lang.*; public class StudentCollection { private Collection students; public StudentCollection() { students = new LinkedList(); populateList(); } public final void populateList() { 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")); } public Collection getStudents() { return students; } public static void main(String args[]) { StudentCollection stl = new StudentCollection(); Collection sts = stl.getStudents(); // comment out this line and uncomment the following comments /* Collection sts = new LinkedList(); sts.add(new Student("John", "Smith")); sts.add(new Student("Stanley", "Peters")); */ if( stl.getStudents().containsAll(sts) ) { System.out.println("containsAll:TRUE"); } else { System.out.println("containsAll:FALSE"); } } }