try catch finally

 

返回值 2

public static int getNum(){
try{
return 1;

}catch(Exception e){

e.printStackTrace();

}finally{

return 2;
}

}

posted @ 2013-05-04 17:37  jshen  阅读(102)  评论(0编辑  收藏  举报