StupidBeauty
Read times:1370Posted at:Thu Sep 12 20:30:41 2013
- no title specified

转载:Java try catch finally的执行顺序

finally块中的语句,无论如何都会被执行。

http://diaolanshan.iteye.com/blog/537215

亮点:

需要首先注意的几点:

1) try catch finally中的finally不管在什么情况之下都会执行,执行的时间是在程序return 之前.

2) Java 编译器不允许有显示的执行不到的语句块,比如return之后就不可能再有别的语句块(分支不属于此列) 所以以下程序编译会报错:

任雪

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4