Q:

Java - Exception Handling(ArithmeticException)

0

This Program is used to demonstrate the ArithmeticException concept.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

class ariex1

 {

   public static void main(String arg[])

    {

      try

        {

         int a,b,c;

         a=10; b=0;

         c=a/b;

         System.out.println(c);

        }

         catch(ArithmeticException e)

          {   }

       finally

        {

          System.out.println("\nDivide by zero, change the value..."); 

        }

    }

 }

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now