I think that the explanation given in the answer contains an invalid statement:
"All exceptions given in the options other than Exception, are RuntimeExceptions".
There is also "ClassNotFoundException" among the given exceptions, which is not a RuntimeException. It directly inherits from Exception, thus it's a checked exception, that IS thrown by the API (example: method readObject() and writeObject()).
About Question com.enthuware.ets.scjp.v6.1.820 :
Moderators: Site Manager, fjwalraven
-
- Posts: 8
- Joined: Thu Feb 23, 2012 5:33 am
- Contact:
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.1.820 :
You are right. It has been changed to NoClassDefFoundError and the explanation has been updated to that it is thrown by the JVM when it attempts to load a class and is unable to find the class file. It extends ///java.lang.Error/// and Errors are always thrown by the JVM. A programmer should never throw an Error explicitly.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 4 guests