Setting own class as key in java Hashmap

后端 未结 8 1970
萌比男神i
萌比男神i 2020-12-09 10:24

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         


        
8条回答
提交回复
热议问题