JDBC Tutorial
What is JDBC? JDBC (Java DataBase Connectivity) is an API which defines how to connect and access a database from Java application.
Steps to connect Java application with database Register the driver Class.forName() can be used to explicitly load and register the driver class. From jdbc 4.0 onwards we don’t need to load the driver explicitly.
Class.forName("com.mysql.jdbc.Driver");
Create a connection getConnection() of DriverManager class is used to create connection.