Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Throwable exception in java

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the example analysis of Throwable exception in java, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article.

Throwable

Throwable is the base class for all exception classes, as shown in the figure:

Throw an exception through throw-throws, and then catch the exception with try-catch

Where run-time and non-run-time exceptions are usually encountered in development,

Common runtime exceptions are:

1. Arithmetic exception: ArithmeticException

two。 Class conversion exception: ClassCastException

3. Illegal parameter exception: IllegalArgumentException

4. Subscript out of bounds exception: IndexOutOfBoundsException

5. Null pointer exception: NullPointerException

6. Security exception: SecurityException

Common non-runtime exceptions are:

1. Input stream exception: IOException

two。 No exception found in the file: FileNotFoundException

3.SQL running exception: SQLException

Thank you for reading this article carefully. I hope the article "sample Analysis of Throwable anomalies in java" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report