class B{
protected int x;
B(){
x=10;
}
B(int a){
x=a;
}
void ml(){x=20;}
void ml(int x){this.x=x;}
}
public class A{
int x;
A(){
x=20;}
A(int x){this.x=x;}
void ml(B x){
this.x=x.x++;
}
Public static void main(
String args[]){
A x=new A(20);
B y=new B();
S.o.p(x.x);
x.ml(y);
S.o.p(x.x);
x.ml(30);
S.o.p(y.x);
((A)x).ml(y);
S.o.p(y.x);
}
}
ans is 20,10,30,31,pl explain