本帖最后由 lovecx24 于 2013-11-30 12:10 编辑
为什么先打印 finally excuting,最后打印ArithmeticException- public class ThrowDeni{
- public static void main(String[] args){
- try{
- System.out.println("only try");
- throw_do();
- System.out.println("after throw_do");
- }finally{
- System.out.println("finally excuting");
- }
- public static void throw_do(){
- throw new ArithmeticException();
- }
- }
复制代码 如果我想先打印after_do,在打印finally excuting,如何改?
|