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.21Medium

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

Q.22Medium

In JDBC, what is the purpose of the ResultSetMetaData interface?

Q.23Medium

Which JDBC constant specifies read-only access for a ResultSet?

Q.24Medium

What is Connection pooling in JDBC and why is it used?

Q.25Medium

In JDBC, what is the purpose of CallableStatement?

Q.26Medium

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

Q.27Medium

Which JDBC method executes UPDATE, INSERT, or DELETE statements?

Q.28Medium

What is the benefit of using PreparedStatement over Statement for repeated queries?

Q.29Medium

What does ResultSetMetaData.getColumnCount() return?

Q.30Medium

In JDBC, which class is used to retrieve database metadata information?

Q.31Medium

What is the difference between execute() and executeUpdate() methods?

Q.32Medium

Which statement should be used when you need to retrieve column information without executing multiple queries?

Q.33Medium

What happens if you call next() on a ResultSet after the last row?

Q.34Medium

Which JDBC driver type is considered the most portable across different databases?

Q.35Medium

A developer needs to execute a query that returns multiple result sets. Which Statement type should be used?

Q.36Medium

What is the purpose of Connection pooling in JDBC applications?

Q.37Medium

Consider a scenario where a developer uses getConnection() without closing it. What is the potential impact?

Q.38Medium

What does the setMaxRows() method in Statement do?

Q.39Medium

In a multi-threaded JDBC application, what should be the approach for Connection object usage?

Q.40Medium

Which method in ResultSet is used to check if a column value is NULL?