Given:<br /> <img src="https://img.ppkao.com/2018-08/wenxueying/2018080116053655451.png" /><br /> A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()<p> Given:<br /> <img src="https://img.ppkao.com/2018-08/wenxueying/2018080116053655451.png" /><br /> A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()</p>
A、A.public int hashCode()
B、B.public boolean equals(Key k)
C、C.public int compareTo(Object o)
D、D.public boolean equals(Object o)
E、E.public boolean compareTo(Key k)