What is API in java

What you will learn here about API in java

  • What is API in java
  • Structure of API in java
  • Example of API in java

What is API in java

API stands for the Application program interface. API is used for inter-application communication means one application can communicate with another application using API which is shown below. Basically API’s are to achieve loose coupling. The backbone of API is abstraction and abstraction is achieved by using Interface or abstract class or both.
What is API in java



Structure of API in java

All java API’s are provided by the Sun microsystem to achieve loose coupling. API’s contains Interfaces and helper classes. The structure of API in java is shown below. The implementation of API is called Driver.
Structure of API in java

Example of API in java:

JBDC, Servlet, etc are the example of API in java. The structure of JDBC API is Shown below. JDBC API is used to communicate with the database from java application. JDBC API is provided by the sun microsystem and the implementation of JDBC API is provided by respective database vendors. Generally, the implementation of the JDBC API provided by the respective database is called JDBC Drivers. JDBC drivers are specific for a particular database and it is provided by the respective database vendors.
Example of API in java

If you want to know how to communicate with database using JDBC then please visit the below link.

JDBC connection steps in java



You may also like...

Leave a Reply