摘要: 使用try...catch...finally语句 1 int[] myArr = { 1, 2, 3, 4 }; 2 3 try 4 { 5 int tmp = myArr[4]; //容易出现异常的语句 6 } 7 catch(IndexOutOfRangeException e) //括号内是 阅读全文
posted @ 2023-02-16 17:15 HiBlack 阅读(40) 评论(0) 推荐(0)