Closing a ConnectionAfter you complete required data operations in the database, close the database connection.Call the close method to close the connection, for example, Connection conn = null; conn.close().