class Test { private Foo myFoo; Test() { new Foo() myFoo = new Foo(); } } class Foo{}