// inherit8
// based on some questions during lecture
// how to access a private member? use another method

class A {
    private int x;
    A(int x) { this.x = x; }
    void print() { System.out.println(x); }
}

class B extends A {
    B(int x) { super(x); }
    void print() { 
	// System.out.println(super.x); // cannot "see" the hidden $x$
	super.print(); // output: 1
    }
}

public class inherit8 {
    public static void main(String[] args) {
	new B(1).print();
    }
}
