Answers:
a. 6
b. 2
c. 2
d.
public void func(){
this.u = 10;
this.w = 15.3;
}
e.
public void print()
{
System.out.println(String.format("u = %d, w = %f",u,w))
}
f.
public XClass()
{
this.u = 0;
this.w = 0;
}
g.
public XClass(int a, double b)
{
this.u = a;
this.w = b;
}
h.
x.print();
Comments
Leave a comment