CLOSE THE DATABASE CONNECTION:
It is not necessary to close the connection, but open database can cause problems, so its better to close the database connection.
For this close( ) method is used.
Here, stmt is statement object to be closed.
Here, cn is the connection object to be closed.