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 3689

Given:
1.    class Super {
2.    private int a;
3.    protected Super(int a) { this.a = a; }
4.    } ...
11.    class Sub extends Super {
12.    public Sub(int a) { super(a); }
13.    public Sub() { this.a = 5; }
14.    }
Which two, independently, will allow Sub to compile? (Choose two.)

 

Option A

A.    Change line 2 to: public int a;
 

Option B

B.    Change line 2 to: protected int a;
 

Option C

C.    Change line 13 to:
public Sub() { this(5); }
 

Option D

D.    Change line 13 to:
public Sub() { super(5); }
 

Option E

E.    Change line 13 to: public Sub() { super(a); }

Correct Answer C,D
Explanation


Question ID 3690

Given:
1.    public class Base {
2.    public static final String FOO = "foo";
3.    public static void main(String[] args) {
4.    Base b = new Base();
5.    Sub s = new Sub();
6.    System.out.print(Base.FOO);
7.    System.out.print(Sub.FOO);
8.    System.out.print(b.FOO);
9.    System.out.print(s.FOO);
10.    System.out.print(((Base)s).FOO);
11.    } }
12.    class Sub extends Base {public static final String FOO="bar";}
What is the result?
 

Option A

A.    foofoofoofoofoo
 

Option B

B.    foobarfoobarbar
 

Option C

C.    foobarfoofoofoo
 

Option D

D.    foobarfoobarfoo
 

Option E

E.    barbarbarbarbar
 

Option F

F.    foofoofoobarbar
 

Correct Answer D
Explanation

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