DEVFYI - Developer Resource - FYI

If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object?

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

517. If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object?

One can not do anytihng in this scenarion. Because Java does not allow multiple inheritance and does not provide any exception interface as well.

(Continued on next question...)

Other Interview Questions