// ArithmeticException
class ArithEx
{
public static void main(String args[])
{
try
{
int a=50, b=0;
int c=a/b;
System.out.println ("Result = " + c);
}
catch(ArithmeticException e)
{
System.out.println ("\nArithmetic Exception: You can't divide 0(zero)");
}
}
}This code snippet is for about ArithmeticException Program in Java.
