Question: 10. Would this program compile/run? If not, why and how would you fix it, if yes, what would be the output? abstract class x abstract

 10. Would this program compile/run? If not, why and how would

10. Would this program compile/run? If not, why and how would you fix it, if yes, what would be the output? abstract class x abstract woid myMethod (Number N interface I ( abstract void myMethod(object 0): class Y extends X implements I { void myMethod(Number N) ( System.out.printin("Number): public void myMethod(Object 0) (System.out.printinc object): public class Q11 public static void main(Stringt args) new Integer(123)); I b new YO; b.myMethod (new Integer(123)): Y c new YO c. myNethod(new Integer(123)) 11. Would this program compile/run? If not, why and how would you fix it; if yes, what would be the output? class C1 f private int f) ( return e; public int go ( return 3; class C2 extends c1 f private int f) f return 1; public int g) f return fO: class C3 extends C2 ( public int f) f return2 public class 012 f public static void main(Stringl] args) C1 ref1 new C3) C2 ref2 (C2) refi; System.out.printin(ref2.gO)

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!