package tpackage; public class TestTryCatchBlock { public static void main(String[] args) { for(int i =4;i>-1;i--) { try { System.out.println(1/i); System.out.println("Result : 1 / " + i +" === " + 1/i); System.out.println("Ending try block"); } catch(ArithmeticException e) { System.out.println("NAO SE DIVIDE POR 0 OH OTARIO"); } System.out.println("SORTE QUE SOU AMIGO, PASSOU"); } } }