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 3920

Given:
11.    class X { public void foo() { System.out.print("X "); } }
12.    
13.    public class SubB extends X {
14.    public void foo() throws RuntimeException {
15.    super.foo();
16.    if (true) throw new RuntimeException();
17.    System.out.print("B ");
18.    }
19.    public static void main(String[] args) {
20.    new SubB().foo();
21.    }
22.    }
What is the result?
 

Option A

A. X, followed by an Exception.
 

Option B

B.    No output, and an Exception is thrown.
 

Option C

C.    Compilation fails due to an error on line 14.
 

Option D

D.    Compilation fails due to an error on line 16.
 

Option E

E.    Compilation fails due to an error on line 17.
 

Correct Answer A
Explanation


Question ID 3921

Given:
1.    public class Mule {
2.    public static void main(String[] args) {
3.    boolean assert = true;
4.    if(assert) {
5.    System.out.println("assert is true");
6.    }
7.    }
8.    }
Which command-line invocations will compile?
 

Option A

A. javac Mule.java
 

Option B

B.    javac -source 1.3 Mule.java
 

Option C

C.    javac -source 1.4 Mule.java
 

Option D

D. javac -source 1.5 Mule.java

Correct Answer B
Explanation

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