Java BasicsGeneral beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
First of all, it only has to be the same when the class is public. And there is no explicit reason for that, it's just a convention that came along with old versions of java and people got used to it... They say it's because of the limited capabilities of the compiler to compile dependencies.