try-catch-finally 中return的用法
**
1、情况一(try中有return,finally中没有return)
**
public class TryTest{
public static void main(String[] args){
System.out.println(test());
}
private static int test(){
int num = 10;
try{
System.out.println("try");
return num += 80;
}ca
原创
2021-07-12 15:07:01 ·
413 阅读 ·
0 评论