can anybody help me what is happening in the following example
class B{
protected int x;
B(){ x = 10;}
B(int a){ x = a;}
void m1(){x = 20;}
void m1(int x){this.x = x;}
}
public class A {
int x;
A(){x = 20;}
A(int x){this.x = x;}
void m1(B x){this.x = x.x++;}
public static void main(
String arf[]){
A x = new A(20);
B y = new B();
System.out.println(x.x);
x.m1(y);
System.out.println(x.x);
y.m1(30);
System.out.println(y.x);
((A)x).m1(y);
System.out.println(y.x);
}
}