JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Java Database Connectivity interview questions
Java Database Connectivity interview questions
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 15
1. Which of the following is correct about driver interface of JDBC?
A. JDBC driver is an interface enabling a Java application to interact with a database.
B. The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.
C. Both of the above.
D. none of the above.
Show Correct Answer
Correct Answer is :
Both of the above.
2. In which of the following type of ResultSet, the cursor can only move forward in the result set?
A. ResultSet.TYPE_FORWARD_ONLY
B. ResultSet.TYPE_SCROLL_INSENSITIVE
C. ResultSet.TYPE_SCROLL_SENSITIVE
D. None of the above.
Show Correct Answer
Correct Answer is :
ResultSet.TYPE_FORWARD_ONLY
3. Which of the following type of JDBC driver, is also called Type 2 JDBC driver?
A. JDBC-ODBC Bridge plus ODBC driver
B. Native-API, partly Java driver
C. JDBC-Net, pure Java driver
D. Native-protocol, pure Java driver
Show Correct Answer
Correct Answer is :
Native-API, partly Java driver
4. Which of the following type of JDBC driver is typically used for development and testing purposes only?
A. Type 1
B. Type 2
C. Type 3
D. Type 4
Show Correct Answer
Correct Answer is :
Type 1
5. Which of the following is used to call stored procedures on the database?
A. Statement
B. PreparedStatement
C. CallableStatement
D. None of the above.
Show Correct Answer
Correct Answer is :
CallableStatement
6. Which of the following contains both date and time?
A. java.io.date
B. java.sql.date
C. java.util.date
D. java.util.dateTime
Show Correct Answer
Correct Answer is :
java.util.dateTime
7. Which of the following is advantage of using JDBC connection pool?
A. Slow performance
B. Using more memory
C. Using less memory
D. Better performance
Show Correct Answer
Correct Answer is :
Better performance
8. Which of the following is advantage of using PreparedStatement in Java?
A. Slow performance
B. Encourages SQL injection
C. Prevents SQL injection
D. More memory usage
Show Correct Answer
Correct Answer is :
Prevents SQL injection
9. Which one of the following contains date information?
A. java.sql.TimeStamp
B. java.sql.Time
C. java.io.Time
D. java.io.TimeStamp
Show Correct Answer
Correct Answer is :
java.sql.TimeStamp
10. What does setAutoCommit(false) do?
A. commits transaction after each query
B. explicitly commits transaction
C. does not commit transaction automatically after each query
D. never commits transaction
Show Correct Answer
Correct Answer is :
does not commit transaction automatically after each query
11. Which of the following is used to call stored procedure?
A. Statement
B. PreparedStatement
C. CallableStatment
D. CalledStatement
Show Correct Answer
Correct Answer is :
CallableStatment
12. Which of the following is used to limit the number of rows returned?
A. setMaxRows(int i)
B. setMinRows(int i)
C. getMaxrows(int i)
D. getMinRows(int i)
Show Correct Answer
Correct Answer is :
setMaxRows(int i)
13. Which of the following is method of JDBC batch process?
A. setBatch()
B. deleteBatch()
C. removeBatch()
D. addBatch()
Show Correct Answer
Correct Answer is :
addBatch()
14. Which of the following is used to rollback a JDBC transaction?
A. rollback()
B. rollforward()
C. deleteTransaction()
D. RemoveTransaction()
Show Correct Answer
Correct Answer is :
rollback()
15. Which of the following is not a JDBC connection isolation levels?
A. TRANSACTION_NONE
B. TRANSACTION_READ_COMMITTED
C. TRANSACTION_REPEATABLE_READ
D. TRANSACTION_NONREPEATABLE_READ
Show Correct Answer
Correct Answer is :
TRANSACTION_NONREPEATABLE_READ
Similar Interview Questions
Search for latest jobs
Find Jobs