// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class Var {
    public static void main(String[] args) {
        Test o1 = new Test();
        o1.display();
        Test o2 = new TestExtend();
        o2.display();
    }
}

class Test {
    private int a = 23;
    public void display() {
        System.out.println(this.getA());
    }
    public Object getA() {
        return a;
    }
}

class TestExtend extends Test {
    private String a = "hello world";
    @Override
    public Object getA() {
        return a;
    }
} 
