My deepest apologies if this is known, has workarounds, and if I'm blind, but I am having a partial serious issue here.
I have solved a problem in Java and saved it in a file called "factorial3.java". My Java class name is "factorial3". I have compiled and ran this problem in both Ubuntu and Mac OS X, and my programs compiles and works fine in both platforms.
However, when I submit the program to the judge, I get a compilation error, and when I click it, I get the following message:
"Main.java:4 class factorial3 is public, should be declared in a file named factorial3.java.
public class factorial3
^
1 error"
I don't get it since factorial3 is indeed in it's own file called factorial3.java.
created
last reply
- 4
replies
- 843
views
- 4
users