When I don\'t need to use instances of those ResultSet and Connection anymore in my program, why should I call the .close() method on both of them ?
What are the dan
By not closing JDBC connections you increase the likelihood of long waits for idle JDBC connections to be reaped where connection pooling is used. Closing JDBC connections will allow quicker reuse and improve performance.
Failure to close resultsets, can lead to some databases not freeing up cursor resources.