what is the output??
classpractice
{
staticshorttype;
public SuperTest(int a)
type = (short)a;
}
publicstaticvoid manip(int delta)
type += delta;
publicclass JavaTestextends SuperTest
int item;
private JavaTest(int a)
super(a);
item = a;
type -= delta;
publicint getTotal()
return item+type;
publicstaticvoid main(String[] args)
SuperTest bob =new JavaTest(10);
bob.manip(5);
int num = ((JavaTest)bob).getTotal();
JavaTest tim =new JavaTest(num);
tim.manip(12);
System.out.println(tim.getTotal());
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here