Hi Paul,
As per the explanation of the answer:
"Note that the program ends with ExceptionInInitializerError because any exception thrown while constructing an object is wrapped into ExceptionInInitializerError and then that ExceptionInInitializerError is thrown."
Are statements inside constructors and initializing blocks count as statements that construct an object? If so, the explanation might be a little confusing since exceptions thrown in constructors and initializing blocks are not wrapped in ExceptionInInitializerError.
Would it be better to transform it into something like this:
"Note that the program ends with ExceptionInInitializerError because any exception thrown in static blocks is wrapped into ExceptionInInitializerError and then that ExceptionInInitializerError is thrown."
?
About Question enthuware.ocajp.i.v7.2.1326 :
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10401
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1326 :
You are right. The explanation is confusing. This has now been updated.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 3 guests