JaJava · Lesson 7 of 9
Exception Handling
Java has checked exceptions, which force you to handle or declare errors. This is either responsible engineering or the most annoying thing in existence, depending on your morning.
◆ Note
RuntimeException and its subclasses are unchecked — you don't have to declare or catch them. IOException, SQLException, and similar are checked — you must handle them. Design custom exceptions: extend RuntimeException for unchecked, Exception for checked.
RuntimeException and its subclasses are unchecked — you don't have to declare or catch them. IOException, SQLException, and similar are checked — you must handle them. Design custom exceptions: extend RuntimeException for unchecked, Exception for checked.