版权声明:转载注明来源。Keep Learning and Coding. https://blog.csdn.net/a771581211/article/details/88647813
package day08;
/**
* Exception常用方法
* @author kaixu
*
*/
public class ExceptionDemo6 {
public static void main(String[] args) {
System.out.println("程序开始");
try {
String str = "abc";
System.out.println(Integer.parseInt(str));
} catch (Exception e) {
e.printStackTrace(); //输出错误堆栈信息
}
System.out.println("程序结束");
}
}