Hi,
When I run the above code , am able to get the results from database.
But I cant understand how is it so as the code line which loads the jdbc driver
is commented.
Are you using JDBC 4.0 driver? If so the tutorial here states that
DriverManager: This fully implemented class connects an application to a data source, which is specified by a database URL. When this class first attempts to establish a connection, it automatically loads any JDBC 4.0 drivers found within the class path. Note that your application must manually load any JDBC drivers prior to version 4.0.
If not the Class.forName(....) line would be needed.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Don't get me started about those stupid light bulbs.