A
Q. Given the following code:~~~class Base { int x = 10; }~~~class Derived extends Base~~~{ int x = 20; }~~~Base b = new Base();~~~Derived d = new Derived ( );~~~Base bd = new Derived(); The statement~~~System.out.println(b.x + " " + d.x + " " + bd.x);~~~will produce the output
- Correct Answer - Option(D)
- Views: 12
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.