Forums - C# Corner

Forum guidelines
Ken J

Ken J

  • 1.8k
  • 13
  • 328

Explain what would be the output from the code segment:

Dec 5 2018 4:15 AM
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");
}
}

Answers (4)