AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-851





Question ID 3655

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.)
 

Option A

A.    public class MinMax<?> {
 

Option B

B.    public class MinMax<? extends Number> {
 

Option C

C.    public class MinMax<N extends Object> {
 

Option D

D.    public class MinMax<N extends Number> {
 

Option E

E.    public class MinMax<? extends Object> {
 

Option F

F.    public class MinMax<N extends Integer> {
 

Correct Answer D,F
Explanation


Question ID 3656

Given:
12. import java.util.*;
13.    public class Explorer2 {
14.    public static void main(String[] args) {
15.    TreeSet<Integer> s = new TreeSet<Integer>();
16.    TreeSet<Integer> subs = new TreeSet<Integer>();
17.    for(int i = 606; i < 613; i++)
18.    if(i%2 == 0) s.add(i);
19.    subs = (TreeSet)s.subSet(608, true, 611, true);
20.    s.add(629);
21.    System.out.println(s + " " + subs);
22.    }
23.    }
What is the result?
 

Option A

A.    Compilation fails.

 

Option B

B.    An exception is thrown at runtime.
 

Option C

C.    [608, 610, 612, 629] [608, 610]
 

Option D

D.    [608, 610, 612, 629] [608, 610, 629]
 

Option E

E.    [606, 608, 610, 612, 629] [608, 610]
 

Option F

F.    [606, 608, 610, 612, 629] [608, 610, 629]

Correct Answer E
Explanation

Send email to admin@getfreedumps for new dumps request!!!