Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re: * Compile Error Main.java:1: class <Class Name> is public, should be declared in a file named <Class Name>.java

Posted by whus200732580134 at 2008-10-22 09:35:42 on Problem 1207
In Reply To: * Compile Error Main.java:1: class <Class Name> is public, should be declared in a file named <Class Name>.java Posted by:lastajc at 2008-07-27 20:29:55
> how come i am getting this kind of compile error when my program should be running flawlessly in my pc.
> 
> i need any kind of help from anyone...
> 
> thanks!

you should change your class name to "public class Main{}"

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator