ittimepass.com
Write a program in java to demonstrate exception handling with multiple catch block? ⋆ IT TIME PASS
class ExceptionHandling { public static void main(String arg[]) { try { int a=Integer.parseInt(arg[0]); int b=Integer.parseInt(arg[1]); System.out.println(a/b); } catch(ArithmeticException e) { System.out.println(e); } catch(ArrayIndexOutOfBoundsException e) { System.out.println(e); } catch(NumberFormatException e) { System.out.println(e); } catch(Exception …