QUESTION 59
Given:
11. //insert code here
12. private N min, max;
13. public N getMin() { return min; }
14. public N getMax() { return max; }
15. public void add(N added) {
16. if (min == null || added.doubleValue() < min.doubleValue())
17. min = added;
18. if (max == null || added.doubleValue() > max.doubleValue())
19. max = added;
20. }
21. }
Which two, inserted at line 11, will allow the code to compile? (Choose two.)
A. public class MinMax<?> {
B. public class MinMax<? extends Number> {
C. public class MinMax<N extends Object> {
D. public class MinMax<N extends Number> {
E. public class MinMax<? extends Object> {
F. public class MinMax<N extends Integer> {
Solution : DF
'자격증 > OCJP_ExamA' 카테고리의 다른 글
QUESTION 58 (0) | 2018.07.08 |
---|---|
QUESTION 57 (0) | 2018.07.08 |
QUESTION 56 (0) | 2018.07.08 |
QUESTION 55 (0) | 2018.07.08 |
QUESTION 54 (0) | 2018.07.08 |
#IT #먹방 #전자기기 #일상
#개발 #일상