Exception类的常用方法
该类是所有可捕获异常类的基类,应很好去熟悉其内容:
构造方法:
public Exception( )
public Exception(String s)://字符串s是对该异常的描述
常用方法:
public String toString():返回当前异常对象信息的描述;
public String getMessage():返回当前异常对象信息的详细描述;
public void printStackTrace( ):用来跟踪异常事件发生时执行堆栈的内容。
构造方法:
public Exception( )
public Exception(String s)://字符串s是对该异常的描述
常用方法:
public String toString():返回当前异常对象信息的描述;
public String getMessage():返回当前异常对象信息的详细描述;
public void printStackTrace( ):用来跟踪异常事件发生时执行堆栈的内容。
【Exception类的常用方法】相关文章
2. 若通过ObjectOutputStream向一个文件中多次以追加方式写入object,为什么用ObjectInputStream读取这些object时会产生StreamCorruptedExcepti
6. 介绍一下XMLHttpRequest对象的常用方法和属性
本文来源:https://www.mianshiwenti.com/a12418.html
进入下载页面
﹝Exception类的常用方法﹞相关内容
- what is the difference between ext2 and ext3
- What\'s the difference between Debug and Trace class? (Debug类与Trace类有什么区别)
- 面试官的常用陷阱手段
- 外企面试自我介绍的常用句型
- sleep()方法和wait()方法的区别是什么
- 什么是Deployment descriptors;都有什么类型的部署描述符
- 软件测试LoadRunner面试题:What is a function to capture dynamic values in the web vuser script?
- ShellScript面试题一则-ShellScript编程
- 软件测试LoadRunner面试题:If you want to stop the execution of your script on error, how do you do that?
- 请编程遍历页面上所有 TextBox 控件并给它赋值为 string.Empty