+ 2
When did the checked exception occurs??
I found a video says "The exception either it is checked or unchecked, it is generated at run time only ..." But also I found a website, says checked exception occurs at compile time...
2 Antworten
+ 4
Actually, checked exceptions need to be handled by your code(either catched or thrown). If any checked exception is not handled by your code, it will not compile.
+ 3
The exception itself does not occur at compile time. What happens is that a compilation error occurs if there is no code that handles the exception.