What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
try
{
int a = 0;
int b = 5;
int c = a / b;
System.out.print("Hello");
}
finally
{
System.out.print("World");
}
}
}
class Output
{
public static void main(String args[])
{
try
{
int a = 0;
int b = 5;
int c = a / b;
System.out.print("Hello");
}
finally
{
System.out.print("World");
}
}
}
A. Hello
B. World
C. HelloWOrld
D. Compilation Error
Answer: Option C
Join The Discussion