很简单的try catch finally代码,但返回值搞不懂
public class Test {
public static void main(String[] args) {
int b = getValue();
System.out.println(b);
}
private static int getValue(){
int a =0;
try{
a = 10;
return a;
}catch (Exception ex){
}finally{
a=100;
}
return a;
}
}
输出的返回值b是什么?
为什么呢?
没想明白。