super, super()
reference type variable super, constructor super()
class Parent {int x = 10;}
class Child extens Parent {
int x = 20;
void omethod() {
System.out.prinln("x=" - x);
System.out.prinln("this.x=" + this.x);
System.out.prinln("super.x=" + super.x);
}
}Last updated