package in Java

In order from small to big, it goes: Package -> Module -> Library.
* A package contains many classes (.java files) and is basically a folder in your Java projects.
* A module contains many packages (folders with .java files). A module is basically a single purpose library.
* A library contains many modules (a module is usually packaged as a single .jar file). A library can contain many modules, but they are usually all connected by some theme.

A package in Java is used to group related classes. Think of it as a folder in a file directory. We use packages to avoid name conflicts, and to write a better maintainable code. Packages are divided into two categories:
* Built-in Packages (packages from the Java API)
* User-defined Packages (create your own packages)

<b>Built-in Package</b>
The Java API is a library of pre-written classes, that are free to use, included in the Java Development Environment. The library contains components for managing input, database programming, and much much more. The library is divided into packages and classes. Meaning you can either import a single class (along with its methods and attributes), or a whole package that contain all the classes that belong to the specified package. To use a class or a package from the library, you need to use the import keyword:
```
import package.name.Class;   // Import a single class
import package.name.*;   // Import the whole package
import static java.lang.Math.pow; // Import static pow
import static java.lang.Math.*; // Import all static members
```

<b>User-defined Package</b>
To create your own package, you need to understand that Java uses a file system directory to store them. Just like folders on your computer.
To create a package, use the package keyword.