QUESTION 31자격증/OCJP_ExamD2018. 8. 5. 19:41
Table of Contents
반응형
QUESTION 31Given:public class Key {private long id1;private long id2;// class Key methods }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? (Choose two.)A. public int hashCode()B. public boolean equals(Key k)C. public int compareTo(Object o)D. public boolean equals(Object o)E. public boolean compareTo(Key k)Solution : AD
반응형
'자격증 > OCJP_ExamD' 카테고리의 다른 글
QUESTION 33 (0) | 2018.08.05 |
---|---|
QUESTION 32 (0) | 2018.08.05 |
QUESTION 30 (0) | 2018.08.05 |
QUESTION 29 (0) | 2018.08.05 |
QUESTION 28 (0) | 2018.08.05 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상