Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

why it is necessary that public class name should same as filename in java

822526Dec 9 2010 — edited Dec 9 2010
hi,

why it is necessary that public class name should same as filename in java.
As I know that it is a convention, but I want the information why this convention is made.

thanx.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2011
Added on Dec 9 2010
7 comments
304 views