Question: 14, help please class Cl{ int x=0; public int get XO {retum x;} } class C2 extends C1 { C2O{x=2;} public int getMyOwnXO {return x;

14, help please
class Cl{ int x=0; public int get XO \{retum x;} \} class C2 extends C1 \{ C2O{x=2;} public int getMyOwnXO \{return x; \} \} class MyProg \{ public static void main(String[] args) \{ Clc= new C2O; \} \} c.getMyOwnX() can be called. c. x is equal to 2. After casting c back to C2 type, getMyOwnX() can be called. c.getX() can be called. Class C2 has two methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
