Program In Java: I wrote a program written in java and tried to compile in command prompt (which succeeded) however an attempt to run the program failed (via command prompt as well as 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
Error Observed : Could not find or load main class