|
Re: public class
|
Posted: Sep 14, 2005 1:35 AM
|
|
> Hi, I am a new java learner. I have some doubt. > why there is only one public class in one java > file. > > why the name of public class should be same as file > name
Modularity/compilation issues - Paths, etc. and a whole bunch of other stuff. For now I would advise you to just accept it as a standard and things will fall into place as you develop larger projects and start using things like:
import someClassYouWrote;
import somepackage.inAsubDirectory.SomeOtherClass;
You will understand it as time goes (that is if you intend to stick with Java).
|
|