Stephan van Hulst wrote:
- An API is the collection of types and functions that a library exports to the outside world, i.e., all the stuff inside a library that can be used outside the library. The Java Standard API is an example.
Just to expand on this one a bit, I think of the Application Programming Interface as the usage details of how to use a library or class; the method names, the number and type of parameters the method accepts, and the type of data that is returned.
For instance, if I can't remember exactly how to insert a value in a HashMap, the API documentation will tell me the name of the method and the number and types of parameters.