| Start |
|---|
| Using Packages to create classes with the same name First Test.class: Also Test.class in another package The above is fine because the two classes exist in different packages. |
| Using Package Protected Scope In Java if you don't provide an access modifier the default scope for variables is package-protected level. This means that classes can access the variables of other classes within the same package as if those variables were publicly available. This method will not work for a class in another package: RemarksPackages provide access protection. package statement must be first line of source code. There can only be one package in one source file. With help of packages conflict between different modules can be avoided. |
Read Article
https://develop.horje.com/learn/1434/reference