Create A Package

A package is a way to “package” or “wrap” related classes and interfaces in what is called a namespace. A package is akin to a folder on your computer where you place related content in to keep it organized. Placing code into packages makes large projects easier to manage.

Java provides a large class library or set of packages that you can use in your own apps that is sometimes referred to as the “Application Programming Interface” or API. These packages contain classes for creating day-to-day objects like a String Object, File Object, and Socket Object to allow you to focus on designing your app rather than creating the infrastructure from scratch.

The Java Platform API Specification contains the complete listing of all packages, interfaces, classes, fields, and methods. This is a list of literally thousands of items to make your life easier as a programmer so it is best to familiarize yourself with this documentation.