This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes public declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "public declaration" Watch "public declaration" New topic
Author

public declaration

sai donthneni
Ranch Hand

Joined: Mar 26, 2006
Posts: 50
I have a question. Sometimes compilation error occurs which says that certain class has to be declared public. why is it so?
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Can you give a specific exmaple where you have seen this compiler error? Also, please provide the exact error message (i.e. copy and paste it here). This information will help us to answer your question.

Layne


Java API Documentation
The Java Tutorial
sai donthneni
Ranch Hand

Joined: Mar 26, 2006
Posts: 50
sorry I have mistaken, it happens with applet classes which when not declared public gives a run time error. The reason?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: public declaration