By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,135 Members | 820 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,135 IT Pros & Developers. It's quick & easy.

missing some import class(may be)

P: 27
Hi,Experts,I am a new one.
I have made class in java,using netbeans 6.0.1 this getting error if i mouse over on the class name"class shape is public,should be declared in a file named shape.java",

what i missed?
Oct 5 '10 #1
Share this Question
Share on Google+
3 Replies

Dheeraj Joshi
Expert 100+
P: 1,123
That is because your class is public.
This is a standard people have been using from early versions of Java.

Regards
Dheeraj Joshi
Oct 6 '10 #2

P: 27
So dheeraj,what is the solution?
Oct 6 '10 #3

P: 1
check your class.

1.class name and file name must be the same.

2.just only one public class in your class.
Oct 8 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.