There can be only one public class defined in a file so you are getting
this error. If you are having any ide (integrated developement
environment) if you write all the public class in one file only then for
each public class there will be a separate file created. This is what ide
does on behalf of you. Remember that the file name should be the name of
the public class this is what java defines . Hope so you got the correct
answer .
On Dec 6, 2012 3:08 AM, "Amir Hossein Sharifzadeh" <
[email protected]> wrote:
> Is there anyone who has submitted problems in uva onlinejudge or ACM-ICPC
> Live Archive?
> I wrote a problem of the ACM ICPC World finals in Java without any
> problem. But I frequently receive the following error:
> Compilation error for submission
>
>
> Main.java:9: class Bartjens is public, should be declared in a file named
> Bartjens.java
> public class Bartjens {
> ^
> 1 error
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.