62,615
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) {
System.out.println(getNum());
}
public static int getNum() {
int a=0;
try {
return a=3*6;
} finally {
System.out.println(a);
a=10;
}
}
static int f() {//这里报编译错误:must return a resutl of type int!
int id = 0;
int c = 3;
try {
return id;
} catch (Exception e) {
return c;
} finally {
System.out.println("finally");
}
}