Exemptions checked in unchecked
You can explain why they're turning around.
uncheckedJava? What does that give? If not mistaken, it is not recommended to process
If your code is exceptional.
checkedthat means you need to process them with help.
try-catchor call for a global exemption process that selects these exemptions.
If the exception is not processed, then the method should be noted as
throwsIt's an exception.
In some cases, this is not possible, for example, if the method overlaps the external interface in which the treatment of exemptions is mandatory, the method ' s signature cannot be changed by adding
throwsand the method shall close the interface.
If the exception is waived as
unchecked, it can be catched later, but it won't be recommended because it does not allow for exemptions to be processed, and the programme is not working.
Here. https://ru.stackoverflow.com/a/901527/204920 , this answer also refers to how to do the opposite, i.e. to catch up.
uncheckedExemptions and exclusion
To understand better than different
checkedMay be read https://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html ♪
That's what Oracle writes about:
“If a client can reasonably be expected to recover after an exception, make him
checkedExcept. If a client can't do anything to recover after graduation, do it.
It is therefore not recommended that one type of exception be introduced into another type because we cannot change the client's ability.