Each Java application requires a class with a method named main, which is the method invoked when the program starts. In this
simple example, JDBCConnect.main is the only public method in the application.
The JDBCConnect.main method carries out the following tasks:
Determines which driver to load based on the command line argument. For jConnect and the SQL Anywhere JDBC 3.0 driver, it
loads the requested driver (using the Class.forName method). The SQL Anywhere JDBC 4.0 driver is automatically loaded at startup
if it is in the class file path.
Connects to the default running database using the selected JDBC driver URL. The getConnection method establishes a connection
using the specified URL.
Creates a statement object, which is the container for the SQL statement.
Creates a result set object by executing a SQL query.
Iterates through the result set, printing the column information.
Closes each of the result set, statement, and connection objects.