class Test { void m(boolean b) { int x = 42; try { if(b) { x = 23; throw new Exception(); } } catch(Exception e) { System.out.println(x); } } }