iGET

Java Programming - MCQ Practice Questions

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

951 questions | 100% Free

Q.621Hard

What is the difference between update() and updateRow() methods in ResultSet?

Q.622Medium

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

Q.623Medium

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

Q.624Hard

A developer wants to prevent SQL injection attacks while executing dynamic queries. Which approach is most secure?

Q.625Hard

What is the default transaction isolation level in JDBC when autocommit is disabled?

Q.626Hard

Which method is used to check if a CallableStatement has a return value from a stored procedure?

Q.627Easy

What happens when you call rs.next() on a ResultSet after the last row?

Q.628Hard

A batch update operation fails partially. How can you identify which statements failed in the batch?

Q.629Medium

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

Q.630Hard

In JDBC, what is the purpose of using a SavePoint in a transaction?

Q.631Easy

Which interface in JDBC is used to execute a single SQL statement and return a ResultSet?

Q.632Easy

What is the primary advantage of using PreparedStatement over Statement in JDBC?

Q.633Easy

Which JDBC method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE statement?

Q.634Easy

What does the DriverManager.getConnection() method return?

Q.635Easy

In JDBC, which exception is thrown when the database driver class is not found?

Q.636Easy

What is the purpose of the Connection.commit() method in JDBC?

Q.637Medium

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

Q.638Medium

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

Q.639Medium

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

Q.640Medium

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