Skip to content

Commit c279173

Browse files
authored
修改文章排版
1 parent d059609 commit c279173

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Java相关/Java基础知识.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,11 @@ final关键字主要用在三个地方:变量、方法、类。
401401
**注意:异常和错误的区别:异常能被程序本身可以处理,错误是无法处理。**
402402

403403
### Trowable类常用方法
404-
**public string getMessage()**:返回异常发生时的详细信息
405-
**public string toString()**:返回异常发生时的简要描述
406-
**public string getLocalizedMessage()**:返回异常对象的本地化信息。使用Throwable的子类覆盖这个方法,可以声称本地化信息。如果子类没有覆盖该方法,则该方法返回的信息与getMessage()返回的结果相同
407-
**public void printStackTrace()**:在控制台上打印Throwable对象封装的异常信息
404+
405+
- **public string getMessage()**:返回异常发生时的详细信息
406+
- **public string toString()**:返回异常发生时的简要描述
407+
- **public string getLocalizedMessage()**:返回异常对象的本地化信息。使用Throwable的子类覆盖这个方法,可以声称本地化信息。如果子类没有覆盖该方法,则该方法返回的信息与getMessage()返回的结果相同
408+
**public void printStackTrace()**:在控制台上打印Throwable对象封装的异常信息
408409

409410
### 异常处理总结
410411

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy