public class ArithmaticExcept { public static void main(String[] args) { try{ int i = 59; int j = 0; System.out.println(i/j); }catch (ArithmeticException e) { System.out.println("*** Error due to divide by Zero"); e.printStackTrace(); } } }
No comments:
Post a Comment