Java - Inheritance
What will be the output of this code snippet?
class Parent {
int x = 10;
}
class Child extends Parent {
int x = 20;
void printX() {
System.out.println(super.x);
}
}
public class Test {
public static void main(String[] args) {
Child c = new Child();
c.printX();
}
}