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 3754

Given:
23. Object [] myObjects = {
24. new Integer(12),
25. new String("foo"),
26. new Integer(5),
27. new Boolean(true)
28. };
29. Arrays.sort(myObjects);
30. for(int i=0; i<myObjects.length; i++) {
31. System.out.print(myObjects[i].toString());
32.    System.out.print(" ");
33.    }
What is the result?
 

Option A

A.    Compilation fails due to an error in line 23.
 

Option B

B.    Compilation fails due to an error in line 29.
 

Option C

C.    A ClassCastException occurs in line 29.
 

Option D

D.    A ClassCastException occurs in line 31.
 

Option E

E.    The value of all four objects prints in natural order.
 

Correct Answer C
Explanation


Question ID 3755

Given:
1.    public class Donkey {
2.    public static void main(String[] args) {
3.    boolean assertsOn = false;
4.    assert (assertsOn) : assertsOn = true;
5.    if(assertsOn) {
6.    System.out.println("assert is on");
7.    }
8.    }
9.    }
If class Donkey is invoked twice, the first time without assertions enabled, and the second time with assertions enabled, what are the results?

 

Option A

A.    no output
 

Option B

B.    no output assert is on
 

Option C

C.    assert is on
 

Option D

D.    no output
An AssertionError is thrown.
 

Option E

E.    assert is on
An AssertionError is thrown.

Correct Answer D
Explanation

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