I have a small doubt in closing connection objects. If i close the connection objects directly without closing the PreparedStatement and ResultSet object in a method. Will the db connection object be closed or will it become a dangling object waiting for GC to run and claim them.
When i tried sometimes i get the connection object left open and sometimes it get closed. Why does it behaves like this..