1.

What are two exception classes in hierarchy of java exceptions class?(a) Runtime exceptions only(b) Compile time exceptions only(c) Runtime exceptions and other exceptions(d) Other exceptionsThe question was posed to me in an online quiz.This intriguing question originated from Exception Handling topic in division Exception Handling & Static Class Members of Object Oriented Programming

Answer»

Correct option is (c) RUNTIME EXCEPTIONS and other exceptions

Best explanation: The exceptions class is having two other derived classes which are of runtime exception handler and for other type of exceptions handling. The runtime exception handler is USED to handle the exceptions PRODUCED during run time and same with case of other exceptions.



Discussion

No Comment Found

Related InterviewSolutions