Question: what will be the output? class A { public A(int i) { } int myMethod (int i) { } System.out.println (myMethod (i)); } return

what will be the output? class A { public A(int i) { } int myMethod (int i) { } System.out.println(myMethod

what will be the output? class A { public A(int i) { } int myMethod (int i) { } System.out.println (myMethod (i)); } return ++i+ --i; } class 8 extends A { public B(int i, int j) { super(i*j); System.out.println (myMethod(i, j)); } int myMethod (int i, int j) { return myMethod (i*j); } public public class MainClass. public static void main(String[] args) { B b = new B(12, 21); }

Step by Step Solution

3.46 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Java code snippet that replicates the provided classes an... View full answer

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 Programming Questions!