class Test { private boolean notInitialized; public void foo() { if (notInitialized) { notInitialized = false; } } }