public static void main(String[] args) { System.out.println(abc()); } static String abc() { int i = 0; try { System.out.println("In try 1"); i = 100 / 10; System.out.println("In try 2 =>" + i); i = 100 / 0; System.out.println("In try 3 =>" + i); return "try return" + i; } catch (Exception e) { System.out.println("In catch =>" + i); return "catch return"; } finally { System.out.println("In finally =>" + i); } } In try 1 In try 2 =>10 In catch =>10 In finally =>10 catch return