Page 1 of 1
About Question enthuware.ocajp.i.v7.2.1017 :
Posted: Thu Oct 02, 2014 1:44 pm
by Daniel Clinton
For this type of question,
where Exceptions/Errors are said to be thrown either:
1. by JVM
2. by Application (programmatically)
Would it be reasonable to see all checked Exceptions as being thrown programmatically?
Re: About Question enthuware.ocajp.i.v7.2.1017 :
Posted: Thu Oct 02, 2014 8:27 pm
by admin
Yes, it would be a reasonable memory aid. But just to be clear, the opposite is not true i.e. all unchecked exceptions are not necessarily thrown only by the JVM automatically.
Re: About Question enthuware.ocajp.i.v7.2.1017 :
Posted: Fri Sep 15, 2017 4:33 am
by mjmsausava
The illegalState exception and illegalArgument exceptions are not checked exceptions but the answer says these should be handled by the programmer. I thought programmer is required to handle checked exceptions.
Re: About Question enthuware.ocajp.i.v7.2.1017 :
Posted: Fri Sep 15, 2017 10:55 am
by admin
No, the answer doesn't say they these should be handled by the programmer. Please read the complete explanation carefully and let me know if something is not clear.
thank you,
Paul.