I am a beginner to Java. I am using Eclipse now.
What makes me confused is that I am not clear with the dogma of putting files into a project, a folder and a package. If I build a new class, should I put it into the original package or create a new package or new folder or even new project and why?
I am a beginner to Java. I am using Eclipse now. What makes me
Share
This completely depends on application you are developing. If you are developing a large application with many modules in it you should create different projects, linked to each other.
But you say you are beginner, so the answer to your question would be: you should always have your classes classified in different package. The classification is entirely your choice – you can even classify alphabetically if you are comfortable with it. I normally classify them according to their functionalities, like all my Controller classes will be in one package, so are my Bean Classes, Listeners, Constants, Builders, utils, parsers, comparators, models, renderers and so on.
This Java Practices article would be helpful.