The Java™ Tutorials - Exceptions

*特殊說明
1. 翻譯自oracle的The Java™ Tutorials - Exceptions系列**
2. 翻譯水平有限,只是用作自己學習和回顧而已。
3. 歡迎提出各種意見。


Exceptions

What Is an Exception?

The Catch or Specify Requirement

Catching and Handling Exceptions

  1. The try Block
  2. The catch Blocks
  3. The finally Block
  4. The try-with-resources Statement
  5. Putting It All Together

The try Block

The catch Blocks

The finally Block

The try-with-resources Statement

Putting It All Together

Specifying the Exceptions Thrown by a Method

How to Throw Exceptions

  1. Chained Exceptions
  2. Creating Exception Classes

Unchecked Exceptions — The Controversy

Advantages of Exceptions

Summary

Questions and Exercises

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章