The map size

Report a typo

What is the size of the map without overriding hashcode() or equals()?

    Map<Person, Integer> map = new HashMap();
    map.put(new Person("James Gosling"), 1995);
    map.put(new Person("James Gosling"), 1995);

    System.out.println(map.size());
Enter a number
___

Create a free account to access the full topic