Java异常处理方式-异常堆栈信息跟踪
原创约 302 字大约 1 分钟...
213-Java异常处理方式-异常堆栈信息跟踪 .md
注意
本博文仅供学术研究和交流参考,严禁将其用于商业用途。如因违规使用产生的任何法律问题,使用者需自行负责。
概念

示例代码
package com.tencent.chapter08;
/**
Exception in thread "main" java.lang.ArithmeticException: / by zero
at com.tencent.chapter08._04方法调用堆栈.methodThree(_04方法调用堆栈.java:20)
at com.tencent.chapter08._04方法调用堆栈.methodTwo(_04方法调用堆栈.java:14)
at com.tencent.chapter08._04方法调用堆栈.methodOne(_04方法调用堆栈.java:8)
at com.tencent.chapter08._04方法调用堆栈.main(_04方法调用堆栈.java:24)
*/
public class _04方法调用堆栈 {
public static void methodOne()
{
System.out.println("methodOne...........1");
methodTwo();
}
public static void methodTwo()
{
System.out.println("methodTwo...........2");
methodThree();
}
public static void methodThree()
{
System.out.println("methodThree...........3");
int i = 1/0;
}
public static void main(String[] args) {
methodOne();
}
}
分割线
相关信息
以上就是我关于 Java异常处理方式-异常堆栈信息跟踪 知识点的整理与总结的全部内容,希望对你有帮助。。。。。。。
Powered by Waline v2.15.4