-
What is the output of this program?
public class exception_handlingExample
{
public static void main(String args[])
{
try
{
int num = 10;
for (int k = -1; k < 3 ;++k)
num = (num / k);
}
catch(ArithmeticException e)
{
System.out.print("0");
}
System.out.print(num);
}
}
-
- 10
- 3
- Compilation Error
- Runtime Error
- None of these
Correct Option: C
None of these