Online JDBC quiz with 20 questions for JDBC ehtusiasts with some sample
questions. This online test helps you prepare for upcoming interviews,
certification tests and other entrance exams. The score displayed at the end of
JDBC test helps you assess your level of preparation.
Online Practice
Test > JDBC quiz
Here are few sample JDBC test/quiz questions
Which of the following methods are needed for loading a database driver in
JDBC?
registerDriver() method
Class.forName()
Both A and B
getConnection()
To execute a stored procedure “totalStock” in a database server, which of
the following code snippet is used?
Statement stmt = connection.createStatement();stmt.execute("totalStock()");
CallableStatement clbstmnt = con.prepareCall("{call
totalStock}");cs.executeQuery();
StoreProcedureStatement spstmt =
connection.createStoreProcedure("totalStock()");spstmt.executeQuery();
PrepareStatement pstmt =
connection.prepareStatement("totalStock()");pstmt.execute();
Which of the following methods finds the maximum number of connections that
a specific driver can obtain?
Database.getMaxConnections
Connection.getMaxConnections
DatabaseMetaData.getMaxConnections
ResultSetMetaData.getMaxConnections
Click here to start JDBC
practice quiz/test
More Links
In optimistic concurrency control, locks are granted without performing conflict
checks. In this, a track of files which have been read or written is
maintained.............
What
is pessimistic concurrency?
In this approach, each transaction is assigned a timestamp. One can make sure
that they are unique using algorithms like Lamport. ............
|