I encountered a question on Exceptions in a mock test
Which of the following exceptions are considered as application exceptions?
(Select 2 correct options)
A. java.rmi.RemoteException
B. java.lang.ArrayIndexOutOfBoundsException
C. java.io.IOException
D. javax.ejb.EJBException
E. Any exception that extends from java.lang.Exception but not from java.lang.RuntimeException
F. java.lang.Exception
The answers suggested by the mock test tool are C,F.
I don't understand how F could be an answer. Application exceptions are the exceptions which are subclass of Exception, not a sub-class of RuntimeException and not RemoteException. If I have to pick an answer I would rather pick E for an answer. Anybody any comments on this?
Thanks,
Sunil
Which of the following exceptions are considered as application exceptions?
(Select 2 correct options)
A. java.rmi.RemoteException
B. java.lang.ArrayIndexOutOfBoundsException
C. java.io.IOException
D. javax.ejb.EJBException
E. Any exception that extends from java.lang.Exception but not from java.lang.RuntimeException
F. java.lang.Exception
The answers suggested by the mock test tool are C,F.
I don't understand how F could be an answer. Application exceptions are the exceptions which are subclass of Exception, not a sub-class of RuntimeException and not RemoteException. If I have to pick an answer I would rather pick E for an answer. Anybody any comments on this?
Thanks,
Sunil