1. If you need to use a stored procedure with output parameters, which of the following statement type should be used to call the procedure?

  1. Statement
  2. PreparedStatement
  3. CallableStatement

2. From which object do you ask for DatabaseMetaData?

A.Connection

  1. DriverManager
  2. ResultSet
  3. Driver

3. If one intends to work with a ResultSet, which of these PreparedStatement methods will not work?

A.execute()

  1. executeQuery()
  2. executeUpdate()

4. Which character is used to represent an input parameter in a CallableStatement?

A.%

  1. *
  2. ?
  3. #

5. Which one of the following will not get the data from the first column of ResultSet rs, returned from executing the following SQL statement: SELECT name, rank, serialNo FROM employee.?

A.rs.getString(0)

  1. rs.getString(“name”)
  2. rs.getString(1)

6. Which class or interface contains the transaction control methods setAutoCommit, commit, and rollback?

A.Statement

  1. Connection
  2. ResultSet

7. What interface must all interfaces for remote services extend?

  1. java.rmi.RemoteService
  2. java.rmi.Remotable
  3. java.rmi.server.Remote
  4. java.rmi.Remote