What is the size of the map in this code sample?
Note that it doesn't matter if hashCode() or equals() are overridden or not. You will get the same result.
Person james = new Person("James Gosling");
Map<Person, Integer> map = new HashMap();
map.put(james, 1995);
james.setName("J. Gosling");
map.put(new Person("J. Gosling"), 1995);
System.out.println(map.size());