I see that one definition can be this:
Generally RuntimeExceptions are exceptions that can be prevented programmatically.
But that is still not the definition of a checked exception. I thought checked exceptions were "exceptions that can be handled at compile-time". Is that correct and/or can you tell me more?
I also read this on the site, can you explain the quote?
Many people say that checked exceptions (i.e. these that you should explicitly catch or rethrow) should not be used at all.
Java: checked vs unchecked exception explanation
Can I just learn what the definition is? I also read somewhat unexpectedly:
NumberFormatException is unchecked`
But I would think that NumberFormatException
is checked since I would handle that at compile-time. Can you please help me understand? I've done some Java programming but I never wrote my own exception class, why would I need that?
Update
A definition is given is the SCJP book by Sierra / Bates: