I am a newbie learning Java. In Java every source file must contain a public class and that source file should have the same name as that public class. Moreover, no source file can contain two public classes. Why is this restriction?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
In one of his Java Specialists' Newsletters, Heinz Kabutz digs through the Oak Language Specifications. He writes:
Reasons I can think of