inline.mj 319 Bytes
Newer Older
uwgwb's avatar
uwgwb committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
class Foo {
    public Bar bar() {
        return new Bar();
    }
    public static void main(String[] args) {
        System.out.println(new Foo().bar().baz().x);
    }
}
class Bar {
    public Baz baz() {
        Baz baz = new Baz();
        baz.x = 42;
        return baz;
    }
}

class Baz {
    public int x;
}