多项选择题
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?()
A.public int hashCode() B.public void hashCode() C.public int compareTo(Object o) D.public boolean equals(Object o) E.public boolean compareTo(Key k)
单项选择题 What is the appropriate definition of the hashCode method in class Person?()
单项选择题 Which statement is true about the set variable on line 12?()
单项选择题 Which code, inserted at line 4, guarantees that this program will output [1, 2]?()