1.

Which of the following should be true of the object thrown by a thrown statement?(a) Should be assignable to String type(b) Should be assignable to Exception type(c) Should be assignable to Throwable type(d) Should be assignable to Error typeThis question was posed to me by my school teacher while I was bunking the class.This key question is from Exception Handling in portion Exception Handling of Java

Answer»

The CORRECT choice is (c) Should be ASSIGNABLE to THROWABLE type

The best I can explain: The throw STATEMENT should be assignable to the throwable type. Throwable is the super class of all exceptions.



Discussion

No Comment Found

Related InterviewSolutions