"Hani Suleiman"
> > What will be really fun is that, if you
don't override equals() and
> > hashcode() when you should, java collections won't work as expected.
> >
> Uhm, no. Default implementation of equals is ==.
> ...
> > hashcode() when you should, java collections won't work as expected.
> >
> Uhm, no. Default implementation of equals is ==.
> ...
Uhm, no :
public class Hashtable
...
To successfully store and retrieve objects from a hashtable, the objects used as keys must implement the
To successfully store and retrieve objects from a hashtable, the objects used as keys must implement the
hashCode method and the
equals
method. 