关于try和return的面试题
- 2015-10-26 13:40:00
- admin 原创
- 1957
System.out.println(1);
try{
System.out.println(2);
return;
}catch(Exception e){
System.out.println(3);
}finally{
System.out.println(4);
}
System.out.println(5);
}catch(Exception e){
System.out.println(6);
}finally{
System.out.println(7);
}
}
输出的是1,
2
4
7
当try中有return的时候finally会执行
发表评论
文章分类
联系方式
联系人: | 郑州-小万 |
---|---|
电话: | 13803993919 |
Email: | 1027060531@qq.com |
QQ: | 1027060531 |
网址: | www.wanhejia.com |
Update Required
To play the media you will need to either update your browser to a recent version or update your Flash plugin.