APIs & Libraries

APIs & Libraries

APIs :

API is the acronym {ak-ruh-nim} for Application Programming Interface. It enables two applications to communicate without having to know how other is implemented.

No alt text provided for this image

Libraries:

A library is a collection of useful techniques or functions. It refers to implementations that are designed to be reused during an application development.

APIs Vs Libraries :

The API is what a library looks like from the outside for a program that is using it. It is the "face" of a library to other programs. Libraries are the reusable implementations and APIs are interfaces to those implementations.

No alt text provided for this image

An Example: Java APIs and Libraries

The API of a Java library is the set of publicly accessible classes, interfaces, methods in the library. For instance, class System is a public class in Java's standard library, so it is part of the API of the standard Java library. we are using the API of the standard Java library if we are using class System.

A Java library is a collection of java classes which comes in those java packages (Swing, Input/Output etc.), usually but not necessarily located in a jar file. Input/Output libraries of JAVA SE are bundled within stdlib jar.

No alt text provided for this image


要查看或添加评论,请登录

Sanjeev Kumar的更多文章

社区洞察

其他会员也浏览了