Java中关于try-catch的问题

问题是:执行的结果顺序是什么情况代码如下public static void main(String[] args) { System.out.println("GO"); try { String str = null; System.out.println(str.length()); } catch(Exception e) { e.printStackTrace(); } System.out.println("Stop"); }结果图如下

异常信息的打印是由另外的线程执行的,它与主线程争夺控制台的输出流,谁抢到谁打印追问

好的,谢谢

温馨提示:内容为网友见解,仅供参考
第1个回答  2016-08-03
class InsufficientFuelException extends Exception{
public InsufficientFuelException(String ex){
super(ex);

}

}
相似回答