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.601Easy

Which interface in JDBC is used to execute SQL queries and obtain results?

Q.602Easy

What is the correct order of JDBC operations?

Q.603Easy

Which JDBC driver type is platform-independent and does not require native code?

Q.604Easy

What exception is thrown when a database connection cannot be established?

Q.605Easy

Which method is used to retrieve a String value from a ResultSet object?

Q.606Medium

What does the executeUpdate() method return in JDBC?

Q.607Medium

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

Q.608Medium

What is the primary advantage of using PreparedStatement over Statement?

Q.609Medium

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

Q.610Medium

What is Connection pooling in JDBC?

Q.611Medium

Which DriverManager method is used to establish a database connection?

Q.612Medium

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

Q.613Hard

Consider code: String query = "SELECT * FROM users WHERE id=" + userId; stmt.executeQuery(query); What security issue exists?

Q.614Hard

How would you implement batch processing in JDBC for multiple INSERT operations?

Q.615Hard

What is the difference between execute(), executeQuery(), and executeUpdate()?

Q.616Hard

Which JDBC feature allows you to call stored procedures?

Q.617Hard

In JDBC, what does the ResultSet.TYPE_SCROLL_INSENSITIVE constant represent?

Q.618Medium

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

Q.619Easy

Which JDBC driver type is platform-independent and does not require native code installation?

Q.620Easy

What is the correct syntax to retrieve an integer value from a ResultSet object at column index 2?