QUESTION 27자격증/OCJP_ExamC2018. 7. 24. 03:19
Table of Contents
반응형
QUESTION 27A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable.Which implementation of MinMax will compile?A. class MinMax<E extends Comparable<E>> { E min = null; E max = null;public MinMax() {} public void put(E value) { /* store min or max */ }B. class MinMax<E implements Comparable<E>> { E min = null; E max = null;public MinMax() {} public void put(E value) { /* store min or max */ }C. class MinMax<E extends Comparable<E>> { <E> E min = null;<E> E max = null; public MinMax() {} public <E> void put(E value) { /* store min or max */ }D. class MinMax<E implements Comparable<E>> { <E> E min = null;<E> E max = null; public MinMax() {} public <E> void put(E value) { /* store min or max */ }Solution : A
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 29 (0) | 2018.07.24 |
---|---|
QUESTION 28 (0) | 2018.07.24 |
QUESTION 26 (0) | 2018.07.24 |
QUESTION 25 (0) | 2018.07.24 |
QUESTION 24 (0) | 2018.07.24 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상