Checked vs Unchecked exception

后端 未结 6 540
抹茶落季
抹茶落季 2020-11-27 06:49

I\'ve studied that: With an unchecked exception, however, the compiler doesn\'t force client programmers either to catch the exception or declare it in a throws clause. In f

6条回答
  •  失恋的感觉
    2020-11-27 07:29

    It is because,

    1. Unchecked Exceptions are not a result of programmer's fault. Instead they are the serious consequences where we(programmer) aren't expected to do much with it.
    2. In case of Checked Exception, it is an exception generated because of the programmer's fault & often can be resolved by programmer itself.

    Check the following links :

    Why RunTime Exceptions are unchecked ?
    Checked vs Unchecked Exception ?

提交回复
热议问题