Quiz

1:Which of the following statement type should be used to call a stored procedure?
  1. Statement

  2. PreparedStatement

  3. CallableStatement

  4. Connection

A1: C
2:From which object do you ask for DatabaseMetaData?
  1. Connection

  2. ResultSet

  3. DriverManager

  4. DataSource

A2: A
3:Which of the following statements will get return the data from the first column of ResultSet rs, returned by from executing the following SQL statement: "SELECT student_id, first_name, last_name, address FROM DAY09_STUDENT"?.
  1. .rs.getString(0)

  2. .rs.getString("student_id")

  3. .rs.getString(1)

  4. .rs.getInt(1)

A3: B and C

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.