1 public static void main(String[] args) 2 { 3 4 try 5 { 6 Thread thread = new Thread(){ 7 @Override 8 public void run() 9 { 10 int i = 0;11 System.out.println(2/i);12 }13 };14 thread.start();15 }16 catch (Exception e)17 {18 System.out.println("exception");19 }20 }
1 回答
嗶嗶one
TA貢獻1854條經(jīng)驗 獲得超8個贊
說明你這個程序沒有出現(xiàn)異常,如果出現(xiàn)異常就會進入:
catch (Exception e)
17 {
18 System.out.println("exception");
19 }
中運行,你的程序沒有異常,所以就沒有進來。
添加回答
舉報
0/150
提交
取消
