Consider the following classes:
public class Sum {
public int doCalc() {
return 10;
}
public int doAnotherCalc() {
return 20;
}
}
public class BigSum extends Sum {
public int doCalc() {
int x = super.doCalc();
return x + doAnotherCalc();
}
public int doAnotherCalc() {
return 100;
}
}
What is displayed to the console after the following code segment executes:
Sum s = new BigSum();
System.out.println(s.doCalc());
30
110
10
20
100
Answers
Answered by
2
what to do yarr it couldnot be understand.
Similar questions