private static void foo() { try { system.out.println("try"); foo(); } catch (throwable e) { system.out.println("catch"); foo(); } finally { system.out.println("finally"); foo(); } } public static void main(string[] args) { foo(); }