1.

To catch the exceptions ___________________(a) An object must be created to catch the exception(b) A variable should be created to catch the exception(c) An array should be created to catch all the exceptions(d) A string have to be created to store the exceptionThe question was posed to me in quiz.My enquiry is from Exception Handling in chapter Exception Handling & Static Class Members of Object Oriented Programming

Answer»

Correct CHOICE is (a) An object MUST be created to catch the exception

To explain I would SAY: The object must be created of a specific class of which the error has occurred. If the type of error is unknown then we can USE an object of class Exceptions. This object will be able to handle any kind of exception that a program MIGHT produce.



Discussion

No Comment Found

Related InterviewSolutions