Same-named reference types (e.g., two different Math classes) can cause name conflicts when you try to use them, but Java overcomes this problem with packages. This chapter introduces you to the package concept followed by the package and import statements. Finally, you learn about static imports, protected access, and JAR files.
What Are Packages?
Java developers group related classes and/or interfaces into packages, which are unique namespaces for storing reference types. Packages can store classes, interfaces, and subpackages