62,614
社区成员
发帖
与我相关
我的任务
分享
public class Demo_1{
public static void main (String[] args){
System.out.println (" the value of i is--> " + new Demo_1().test());
}
public int test(){
int i = 1;
try{
return i;
}finally{
++i ;
System.out.println ("fianlly is Executed");
return ++i;
}
}
}
public class Demo_1{
public static void main (String[] args){
System.out.println (" the return value is" + new Demo_1().test());
}
private int test(){
int i = 1;
try{
return i;
}finally{
++i ;
System.out.println (" the value of i is " + i);
System.out.println ("fianlly is Executed");
}
}
}