import java.awt.Point; import java.util.HashSet; import java.util.Set; public class MainClass { public static void main(String[] argv) { Set set = new HashSet(); set.clear(); Point p1 = new Point(10, 20); Point p2 = new Point(10, 20); set.add(p1); set.add(p2); System.out.println(set.size()); } }
1