

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


public class StudentBody1 { private ArrayList students; /* … / public void addAll(ArrayList students) { / … / } } public class StudentBody2 { private List students; / … / public void addAll(List students) { / … */ } }
// E.g., what will be printed? List points = new LinkedList(); points.add(new Point(10, 20)); If (points.contains(new Point(10, 20))) { System.out.println(“Found!”); } else { System.out.println(“Not found!”); }
Equality (Cont.)