import java.awt.Point;
import java.util.HashMap;
import java.util.Map;
public class MainClass {
public static void main(String[] argv) {
Map pointToText = new HashMap();
pointToText.clear();
Point p1 = new Point(1, 2);
pointToText.put(p1, "First");
Point p2 = new Point(1, 2);
pointToText.put(p2, "Second");
System.out.println(pointToText);
}
}
|