Examveda
Examveda

What will be the output of the following Java code?
class exception_handling 
{
    public static void main(String args[]) 
    {
        try 
        {
            System.out.print("Hello" + " " + 1 / 0);
        }
        finally 
        {
      System.out.print("World");        	
        }
    }
}

A. Hello

B. World

C. Compilation Error

D. First Exception then World

Answer: Option D


This Question Belongs to Java Program >> Exceptions

Join The Discussion

Related Questions on Exceptions