class Test{ public void foo() { if (cond1){ if (cond2) { System.out.println(); return; } } else if (cond3){ } x(); } }