I have a class which I want to set up as keys in HashMap. I already have implemented the compareTo method for that class. But still when I do:
map.put(new MyKey(d
Do you have the hashCode() defined? compareTo is needed for sorting.
hashCode()
compareTo