Question: What will code output?class X { public int calculate ( int a ) { return a * 2 ; } public int calculate ( int
What will code output?class X
public int calculateint a
return a ;
public int calculateint a int b
return a b;
class Y extends X
public int calculateint a
return a ;
public class Test
public static void mainString args
X obj new Y;
System.out.printlnobjcalculate;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
