Collections and Generics
© examsiri.com
Question : 17 of 53
Marks:
+1,
-0
Given:
Which two, inserted at line 1, will allow the code to compile? (Choose two.)
1. /* insert code here*/
2. private N min, max;
3. public N getMin() { return min; }
4. public N getMax() { return max; }
5. public void add(N added) {
6.   if (min == null || added.doubleValue() < min.doubleValue())
7.   min = added;
8.   if (max == null || added.doubleValue() > max.doubleValue())
9.   max = added;
10. }
11. } Which two, inserted at line 1, will allow the code to compile? (Choose two.)
Go to Question: