The super class for the all class is "Object",which has some many method,in which equals,hashcode,.That methods are override in the following class like HashMap,HashTable, But why in HashSet,ArrayList classes doesn't override these methods?. What are the main reason for?
posted 9 years ago
Regarding hashCode there is no difference between the classes you mentioned: HashMap, Hashtable, HashSet and ArrayList.
All of these do not override the hashCode method because it is already overidden in their respective superclasses (AbstractMap, AbstractSet etc.).