Java OCA OCP Practice Question 2511

Question

Which of the following can fill in the blank? (Choose all that apply.)

public void stmt(Connection conn, int a) throws SQLException { 
     Statement stmt = conn.createStatement(a, __________________________); 
} 
  • A. ResultSet.CONCUR_READ_ONLY
  • B. ResultSet.CONCUR_INSERTABLE
  • C. ResultSet.CONCUR_UPDATABLE
  • D. ResultSet.TYPE_FORWARD_ONLY
  • E. ResultSet.TYPE_SCROLL_INSENSITIVE
  • F. ResultSet.TYPE_SCROLL_SENSITIVE


A, C.

Note

The first parameter is the ResultSet type.

The second parameter is the ResultSet concurrency mode.

Choices D, E, and F are incorrect because they represent the first parameter.

Choice B is incorrect because it is not a constant in JDBC.

Choices A and C are correct.




PreviousNext

Related