Multiple choice

Compiler enforces us to deal with ______ exceptions.

  1. checked

  2. unchecked

  3. both (1) and (2)

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Compiler enforces us to deal with checked exceptions. For example, if we have to write something into file, then we have to write statements into try and catch (handling exception). If we cannot write in that way, then compiler gives compile time error.