Java Library

What

a collection of related classes, methods, and resources that are packaged together to provide a specific set of functionality. A library can contain one or more APIs and may be provided by the Java Standard Library, third-party vendors, or custom-built by the user.

Java API vs Java Library

An API is a set of rules and protocols for accessing a web-based software application or web tool, while a library is a collection of implementations of those rules and a framework for creating applications. A library may contain one or more APIs.