I want to use christophel.joel as my root package until I get a domain name. Which of the following is a better practice?

  • Different set of christophel and joel folders for each project

    Example: \Project Name\christophel\joel\subdirectory\ClassName.java

-OR-

  • Only one set of christophel and joel folders

    Example: \christophel\joel\projectname\subdirectory\ClassName.java

有帮助吗?

解决方案

If you want to use package structure like one you specified then first option will be the preferred. But as per Java coding convention you should use reverse structure of your domain (if any) name for example:

com.example.functionalityCategory
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top