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 3663

Given:
10.    class Line {
11.    public class Point { public int x,y;}
12.    public Point getPoint() { return new Point(); }
13.    }
14.    class Triangle {
15.    public Triangle() {
16.    // insert code here
17.    }
18.    }
Which code, inserted at line 16, correctly retrieves a local instance of a Point object?
 

Option A

A.    Point p = Line.getPoint();
 

Option B

B.    Line.Point p = Line.getPoint();
 

Option C

C.    Point p = (new Line()).getPoint();
 

Option D

D.    Line.Point p = (new Line()).getPoint();
 

Correct Answer D
Explanation


Question ID 3664

Given:
11.    class Alpha {
12.    public void foo() { System.out.print("Afoo "); }
13.    }
14.    public class Beta extends Alpha {
15.    public void foo() { System.out.print("Bfoo "); }
16.    public static void main(String[] args) {
17.    Alpha a = new Beta();
18.    Beta b = (Beta)a;
19.    a.foo();
20.    b.foo();
21.    }
22.    }
What is the result?
 

Option A

A.    Afoo Afoo
 

Option B

B.    Afoo Bfoo
 

Option C

C.    Bfoo Afoo
 

Option D

D.    Bfoo Bfoo
 

Option E

E.    Compilation fails.
 

Correct Answer D
Explanation

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