package cn
.itcast_09
;
public class 面试题
2如果
finally之前有
return {
public static void main(String
[] args
) {
System
.out
.println(getInt());
}
public static int getInt() {
int a
= 10;
try {
System
.out
.println(a
/0);
a
=20;
}catch(ArithmeticException e
) {
a
= 30;
return a
;
}finally {
a
= 40;
return a
;
}
}
}
转载请注明原文地址:https://tech.qufami.com/read-7239.html