public static void AMethod()
{
int num =1;
int div = 0;
int result;
try
{
result = num / div;
}
catch (ArithmeticException ex)
{
System.out.println ("Div by O");
}
}

Mehreen TahirRank #469 · 5.3K reputationPosted Dec 5, 2018, 1:38 AM EST
Faisal PathanRank #291 · 8.6K reputationPosted Dec 5, 2018, 1:56 AM EST
Jignesh KumarRank #91 · 22.9K reputationPosted Dec 5, 2018, 2:49 AM EST
Suraj KumarRank #353 · 7.1K reputationPosted Dec 5, 2018, 3:17 AM EST