Diagram of Exception Hierarchy
In Java, exception can be checked or unchecked. They both fit into a class hierarchy. The following diagram shows Java Exception classes hierarchy.
Red colored are checked exceptions. Any checked exceptions that may be thrown in a method must either be caught or declared in the method's throws clause. Checked exceptions must be caught at compile time. Checked exceptions are so called because both the Java compiler and the Java virtual machine check to make sure this rule is obeyed. Green colored are uncheck exceptions. They are exceptions that are not expected to be recovered, such as null pointer, divide by 0, etc.
Check out top 10 questions about Java exceptions.
<pre><code> String foo = "bar"; </code></pre>
Pingback: 译文《最常见的10种Java异常问题》_Johngo学长()
Pingback: 果博东方客服微信+959788951186(微信)()
Pingback: 8张图理解Java-小林博客()
Pingback: 8张图理解Java | Jeremy Peng's Blog()
Pingback: 8张图理解Java - 一叶网()
Pingback: 8张图理解Java - OkayWit()
Pingback: 8张图理解Java - Noblog其他 | Noblog()
Pingback: Youth Fringe | 8张图理解Java()
Pingback: gry www()
Pingback: 8张图理解Java | 余哥技术博客()
Pingback: 8张图理解Java | haleywang()
Pingback: 10 Questions about Java Exceptions – Must Read | Java Weekly()
Pingback: Java 百问 from programcreek - Dylan‘s Zone()
Pingback: Java in Diagram #java | A Listly List()
Pingback: 用来理解 Java 编程语言的 8 个图表 | 小四个人博客()
Pingback: 用来理解 Java 编程语言的 8 个图表 | Hoki自居地()