Java程序: 我编写了一个用java编写的程序,并尝试在命令提示符下编译(成功),但尝试运行程序失败(通过命令提示符和eclipse)。
package jenkov;
public class CheckProg {
public int math(int i) {
try {
int result = i / 0;
// throw new IOException("in here");
}
catch (Exception e) {
return 10;
}
finally {
return 11;
}
}
public static void main(String[] args) {
CheckProg c1 = new CheckProg();
int res = c1.math(10);
System.out.println("Output :" + res);
}
}
enter code here
观察到错误:无法找到或加载主类