What will be the output of the executeQuery() method in JDBC?
- A boolean indicating success or failure.
- Nothing; it doesn't return any value.
- The number of rows affected.
- The result of the SQL query execution.
The executeQuery() method in JDBC returns a ResultSet object, which contains the result of the SQL query execution. This ResultSet can be used to retrieve and manipulate the query results. The other options are incorrect as they do not accurately describe the output of this method.
Loading...
Related Quiz
- ________ is a special type of statement, which is used to invoke a constructor of the same class.
- When using PrintWriter, the method ________ can be used to flush the stream and check its error state.
- Imagine a scenario where you are developing a library, and you want to restrict the usage of some specific methods to the external world but allow them to be used inside the package. How would you implement this using access modifiers?
- How does the FileWriter class handle character encoding?
- What is the significance of a copy constructor in Java?