36 列举几个常见的运行时异常?.
时间: 2023-09-05 10:10:21 浏览: 124
运行时异常是指在程序运行期间可能发生的异常,常见的运行时异常包:
1. java.lang.IndexOutOfBoundsException数组下标越界异常,发生在访问数组时超出其索引范围。
2. java.lang.NullPointerException:空指针异常,发生在调用未初始化的对象或者不存在的对象时。
3. 其他常见的运行时异常还包括java.lang.ArithmeticException(算术异常),java.lang.ClassCastException(类转换异常)等。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [java面试题进阶版附答案.docx](https://download.csdn.net/download/qq_43797491/87853847)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [常见的运行时异常有哪些?](https://blog.csdn.net/weixin_42631615/article/details/121002305)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文