public String testException(){
try {
int i = 1/0;
System.out.println("try......");
return "try!!!";
}catch (ArrayIndexOutOfBoundsException e){
System.out.println("Exception......");
}finally {
System.out.println("finally......");
}
System.out.println("return......");
return "return!";
}
try catch finally return 示例
最新推荐文章于 2024-06-10 21:57:08 发布