(
i)Given that Thing is a class, how many objects and how many reference
variables are created by the following code?
Thing item, stuff;
item = new Thing();
Thing entity = new Thing();
ii)Examine following code. Write and justify output.
public class MyClass {
public static void main(String[] args) {
C c = new C();
System.out.println(c.max(12, 29));
}
}
class A {
int max(int x, int y) { if (x>y) return x; else return y; }
}
class B extends A{
int max(int x, int y) { return super.max(y,
x)- 10; }
}
class C extends B {
int max(int x, int y) { return super.max(x+10, y+2); }
}