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

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

Q.322Medium

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

Q.323Medium

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

Q.324Medium

In JDBC, what is the purpose of CallableStatement?

Q.325Medium

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

Q.326Medium

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

Q.327Medium

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

Q.328Medium

What does ResultSetMetaData.getColumnCount() return?

Q.329Medium

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

Q.330Medium

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

Q.331Medium

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

Q.332Medium

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

Q.333Medium

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

Q.334Medium

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

Q.335Medium

What is the purpose of Connection pooling in JDBC applications?

Q.336Medium

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

Q.337Medium

What does the setMaxRows() method in Statement do?

Q.338Medium

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

Q.339Medium

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

Q.340Medium

In JDBC 2024-25, which data type mapping is incorrect for Java to SQL?