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 3798

Given:
11.    static void test() {
12.    try {
13.    String x = null;
14.    System.out.print(x.toString() + " ");
15.    }
16.    finally { System.out.print("finally "); }
17.    }
18.    public static void main(String[] args) {
19.    try { test(); }
20.    catch (Exception ex) { System.out.print("exception "); }
21.    }
What is the result?

Option A

A. null
 

Option B

B.    finally
 

Option C

C.    null finally
 

Option D

D.    Compilation fails.
 

Option E

E.    finally exception
 

Correct Answer E
Explanation


Question ID 3799

Given:
10.    interface Foo {}
11.    class Alpha implements Foo {}
12.    class Beta extends Alpha {}
13.    class Delta extends Beta {
14.    public static void main( String[] args ) {
15.    Beta x = new Beta();
16.    // insert code here
17.    }
18.    }
Which code, inserted at line 16, will cause a java.lang.ClassCastException?
 

Option A

A.    Alpha a = x;
 

Option B

B.    Foo f = (Delta)x;
 

Option C

C.    Foo f = (Alpha)x;
 

Option D

D.    Beta b = (Beta)(Alpha)x;
 

Correct Answer B
Explanation

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