Question: 30, please help What would be the output values for c2.x and c2.y? c2.x:,2.y:classCl{intx=0;inty=0;}classC2extendsC1{classMyProg{publicstaticvoidmain(String[]args){Clc=newC2O;c.x=2c.y=2;inty=4;C2c2=(C2)c;System.out.println(c2.x+,+c2.y);}

 30, please help What would be the output values for c2.x

30, please help

What would be the output values for c2.x and c2.y? c2.x:,2.y:classCl{intx=0;inty=0;}classC2extendsC1{classMyProg{publicstaticvoidmain(String[]args){Clc=newC2O;c.x=2c.y=2;inty=4;C2c2=(C2)c;System.out.println(c2.x+","+c2.y);}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!