public class Key { <br /> private long id1; <br /> private long 1d2; <br /> // class Key methods <br /> } <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> public class Key { <br /> private long id1; <br /> private long 1d2; <br /> // class Key methods <br /> } <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&e
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)