Java splits exceptions into two kinds so that expected failures cannot be ignored. Checked exceptions, like IOException, must be caught or declared, because a missing file is something callers should plan for. Unchecked ones, like NullPointerException, usually mean a bug in your code and are not forced on you. This difference is one of the most asked Java interview questions.