P
Q. What will be the output of the following Java program?
class exception_handling
{
public static void main(String args[])
{
try
{
System.out.print("Hello" + " " + 1 / 0);
}
catch(ArithmeticException e)
{
System.out.print("World");
}
}
}
- Correct Answer - Option(B)
- Views: 45
- Filed under category JAVA
Discusssion
Login to discuss.