Statement.close() and its current ResultSet
"wolverine my" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
Hi! The Java API documentation of Statement.close() mentioned that "A Statement object is automatically closed when it is garbage collected. When a Statement object is closed, its current ResultSet object, if one exists, is also closed." Based on the following codes: Statement stmt = conn.createStatme(); ResultSet rs1 = stmt.executeQuery(...); ResultSet rs2 = stmt.executeQuery(...); stmt.close(); When the close() is called, only the current ResultSet rs2 will be closed? How about rs2? -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]