Home » Oracle » 1z0-804 » Which three values will appear in the output?
Given:
Which three values will appear in the output?
A. 5
B. 7
C. a1
D. a2
E. b1
F. b2
Correct Answer: ADE
Explanation/Reference:
Explanation:
Static method of base class is invoked >>
A myA = new B();
System.out.print(myA.doA() + myA.doA2() + myA.a);
class B String doA() { return "b1 "; }
class A protected static String doA2 () { return "a2 "; }
class B int a = 7;
Download Printable PDF. VALID exam to help you PASS.
|
|