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 3803

Given:
 
11.    static void test() throws RuntimeException {
12.    try {
13.    System.out.print("test ");
14.    throw new RuntimeException();
15.    }
16.    catch (Exception ex) { System.out.print("exception "); }
17.    }
18.    public static void main(String[] args) {
19.    try { test(); }
20.    catch (RuntimeException ex) { System.out.print("runtime "); }
21.    System.out.print("end ");
22.    }
What is the result?

Option A

A. test end
 

Option B

B.    Compilation fails.
 

Option C

C.    test runtime end
 

Option D

D.    test exception end
 

Option E

E.    A Throwable is thrown by main at runtime.
 

Correct Answer D
Explanation


Question ID 3804

Given:
1.    public class Plant {
2.    private String name;
3.    public Plant(String name) { this.name = name; }
4.    public String getName() { return name; }
5.    }
1.    public class Tree extends Plant {
2.    public void growFruit() { }
3.    public void dropLeaves() { }
4.    }
Which statement is true?
 

Option A

A.    The code will compile without changes.
 

Option B

B.    The code will compile if public Tree() { Plant(); } is added to the Tree class.
 

Option C

C.    The code will compile if public Plant() { Tree(); } is added to the Plant class.
 

Option D

D.    The code will compile if public Plant() { this("fern"); } is added to the Plant class.
 

Option E

E.    The code will compile if public Plant() { Plant("fern"); } is added to the Plant class.
 

Correct Answer D
Explanation

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