KaranGupta
asked on
cannot find symbol DivideByZeroException
Hi
When I executing the code below I am getting the error above
What is wrong with the code.
When I executing the code below I am getting the error above
class MutipleCatchDemo
{
public void CallMultipleCatch()
{
try
{
int x = 0;
int y = 5/x;
}
catch(DivideByZeroException e1)
{
System.out.println(e1.Message);
}
}
}
class MainClass
{
public static void main(String args[])
{
MutipleCatchDemo s = new MutipleCatchDemo();
s.CallMultipleCatch();
}
}
What is wrong with the code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.