public int mystery(int x, int y) {
int z = 0;
if (x < y) {
z = y - x;
}
if (x >= y) {
z = (++x - ++y);
}
if (x == y) {
z = z + 2;
}
return z * 3;
}
What is the value of each of the following expressions?
10
/ \
20 30
/ \ \
40 50 60
/ / \
70 80 90
public class A {
public void m1() { System.out.println("A.m1()"); }
public void m2() { System.out.println("A.m2()");}
}
public class B extends A{
public void m1() { System.out.println("B.m1()"); }
public void m3() { System.out.println("B.m3()");}
}