Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9155915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:40:49+00:00 2026-06-17T12:40:49+00:00

JavaDoc for Statement is clear: All execution methods in the Statement interface implicitly close

  • 0

JavaDoc for Statement is clear:

All execution methods in the Statement interface implicitly close a statment’s current ResultSet object if an open one exists.

When a Statement object is closed, its current ResultSet object, if one exists, is also closed.

However, there are multiple recommendations to close ResultSet before Statement both on Stack Overflow and on the web in general. Are there known cases where (presumably due to buggy drivers) closing Statement but not ResultSet leads to problems?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:40:50+00:00Added an answer on June 17, 2026 at 12:40 pm

    It’s possible that a buggy JDBC driver could not close ResultSet. Regardless it is best to be specific and intentional so you should close your ResultSet in try…finally block. If you are using JDK7 you can declare the ResultSet variable in the try clause and because it implements AutoCloseable it will be closed automatically without a finally clause.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Javadoc says for .close() of the PreparedStatement says that it .. Releases this Statement
On the JavaDoc for ProcessBuilder it states The methods that create processes may not
According to Serializable javadoc, readResolve() is intended for replacing an object read from the
What JavaDoc tags should I use in private fields and methods in order to
From JavaDoc : public void validate() Validates this container and all of its subcomponents.
I use javadoc to document my classes and methods. I would like to add
JavaDoc for java.io.FileDescriptor.FileDescriptor() says: Constructs an (invalid) FileDescriptor object. If there is no purpose
I'm attempting to parse one particular (home grown) JavaDoc tag in my JavaScript file
In javadoc there is said that yield method Causes the currently executing thread object
The javadoc and tutorial have information about the four applet lifecycle methods ( init()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.