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
What exception is thrown when a database connection fails in JDBC?
In JDBC, what does the executeQuery() method return?
Which interface in JDBC is used to execute parameterized queries and prevent SQL injection attacks?
What is the correct sequence to establish a JDBC connection in Java?
Which method of Connection interface is used to start a transaction in JDBC?
In JDBC, what does the BatchUpdate feature allow developers to do?
Which exception is thrown when a JDBC driver is not found in the classpath?
What is the difference between commit() and rollback() in JDBC transactions?
In a JDBC application, which interface is responsible for executing SQL queries and returning ResultSet objects?