Vidyalelo
Java Programming · Q105

Exceptions

Programming · Java Programming · question 105

Q105

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 = b / a; System.out.print("Hello"); catch(Exception e) System.out.print("World");

A.
Hello
B.
World
Answer
C.
HelloWOrld
D.
Compilation Error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board