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? Ans. One can not do anything in this scenario. Because Java does not allow multiple inheritance and does not provide any exception interface as well.
Download the Study24x7 App, so you can connect and collaborate.