class A{
int x= 30;
void printA(){
Sysout(x);
}
}
class B extends A{
int x= 40;
}
class MyMain(){
public static void main(String args[]){
B obj = new B();
obj.printA(){
}
}
B is the child class of A. Why the output is coming t be 30?? It should b 40? Object of B should have value of x as 40. And sysout(x) means this.x