看代码说结果并简述理由:
public class Main {
public static int testFinally() {
int a = 1;
try {
if (a == 1) {
throw new RuntimeException("REA");
}
} finally {
if (a == 1) {
throw new RuntimeException("REB");
}
a = 2;
}
return a;
}
public static void main (String args[]) {
System.out.println(testFinally());
}
}