Difference between Unchecked exception or runtime exception

后端 未结 8 1551
忘了有多久
忘了有多久 2020-11-29 21:55

This was an interview question. What is the main difference between unchecked exception and error as both are not caught? They will terminate the program.

8条回答
  •  甜味超标
    2020-11-29 22:33

    Error: These are exceptional conditions that are external to the application, and that the application usually cannot anticipate or recover from.

    Runtime exception : These are exceptional conditions that are internal to the application, and that the application usually cannot anticipate or recover from.

    You may want to read this :

提交回复
热议问题