Page 1 of 1

About Question enthuware.ocajp.i.v8.2.1031 :

Posted: Wed Jul 01, 2020 4:21 am
by Ardaks
Hi admin. Could you please explain, why ExceptionInInitializerError is not thrown in the forth point?

Re: About Question enthuware.ocajp.i.v8.2.1031 :

Posted: Wed Jul 01, 2020 4:24 am
by admin
ExceptionInInitializerError can be thrown when the code is run. But before you can run the code, it has to be compiled. Option 4 fails during compilation, which means, you can't run it. So, an ExceptionInInitializerError will not be thrown.