Before diving into the details, let’s first introduce the technology. Readers who are already familiar with JDBC may want to skip this section, or revisit it!
The basic JDBC steps include loading and registering the driver, connecting to the database, creating a statement object, executing the query, processing the results, and closing the resources.
Loading and registering the driver can be achieved in your code using either
Class.forName; in case something goes wrong, the first method throws a
SQLException and the second throws a