直接了断明白人代码能看懂的(随便写的测试)
package com.onlyk.api.rabbitmqapi.ttl;
/**
* @author only老K 我为自己代言
* @create 2020-03-04 11:24
* @blogaddress https://blog.csdn.net/weixin_44255950
*/
public class test1 {
public static void main(String[] args) {
System.out.println("返回的值为:"+new test1().test());
}
public int test(){
int i=1;
try{
System.out.println("try中的i值为:"+i);
return i;
}finally{
System.out.println("进入finally....");
++i;
System.out.println("finally中的i值为:"+i);
}
}
}
在return后执行。。。return只是暂时将结果暂存了