Technologies used

Steps to Process Create SQL statement with JDBC

Establishing a connection

Create a statement

Execute the query

Using try-with-resources Statements to Automatically Close JDBC Resources

From JDBC 4.0, we don't need to include 'Class.forName()' in our code, to load JDBC driver. When the method 'getConnection' is called, the 'DriverManager' will automatically load the suitable driver among the JDBC drivers that were loaded at initialization and those loaded explicitly using the same class loader as the current application.