1.

A single try block must be followed by which of these?(a) finally(b) catch(c) finally & catch(d) none of the mentionedThis question was addressed to me by my college director while I was bunking the class.The doubt is from Finally & Built in Exceptions topic in section Exception Handling of Java

Answer»

The correct OPTION is (c) finally & catch

To EXPLAIN I WOULD say: try block can be followed by any of finally or catch block, try block checks for exceptions and work is performed by finally and catch block as per the exception.



Discussion

No Comment Found

Related InterviewSolutions