iGET

Java Programming - MCQ Practice Questions

Practice free Java Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

958 questions | 100% Free

Q.301Medium

Which interface is used to execute precompiled SQL statements in JDBC?

Q.302Medium

What is the primary advantage of using PreparedStatement over Statement?

Q.303Medium

Which method must be called to move cursor to the next row in ResultSet?

Q.304Medium

What is Connection pooling in JDBC?

Q.305Medium

Which DriverManager method is used to establish a database connection?

Q.306Medium

What does the setAutoCommit(false) method do in JDBC?

Q.307Medium

Which of the following is the correct way to close JDBC resources to prevent resource leaks?

Q.308Medium

What does the PreparedStatement interface provide that Statement does not?

Q.309Medium

Which exception is thrown when a database operation violates a unique constraint in JDBC?

Q.310Medium

What is the correct way to use try-with-resources for JDBC operations?

Q.311Medium

Which method is used to retrieve metadata about the database in JDBC?

Q.312Medium

In JDBC, what does the ResultSet.absolute(5) method do?

Q.313Medium

Which JDBC feature allows multiple SQL statements to be sent to the database in a single round trip?

Q.314Medium

In JDBC, which concurrency type allows modifications to the ResultSet?

Q.315Medium

Which JDBC method allows you to retrieve column information such as column name, type, and size?

Q.316Medium

Which JDBC method is used to retrieve metadata information about the database?

Q.317Medium

In a JDBC batch operation, what does executeBatch() return?

Q.318Medium

What is the difference between ResultSet.TYPE_SCROLL_INSENSITIVE and ResultSet.TYPE_SCROLL_SENSITIVE?

Q.319Medium

Which JDBC method is used to set an input parameter in a PreparedStatement?

Q.320Medium

What happens when Connection.setAutoCommit(false) is called in JDBC?