Java中Exception异常处理的常用方法

版权声明:转载注明来源。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("程序结束");
	}

}

猜你喜欢

转载自blog.csdn.net/a771581211/article/details/88647813