Java Reference
In-Depth Information
12.
What is the parent interface of CallableStatement?
13.
Which properties would you use to create a statement whose result set is scrollable
and updatable? Select all that apply.
a.
TYPE_FORWARD_ONLY
b.
TYPE_SCROLL_INSENSITIVE
c.
CONCUR_READ_ONLY
d.
CONCUR_UPDATABLE
e.
CLOSE_CURSORS_AT_COMMIT
14.
Suppose that you have a java.sql.Statement object and you want to use it to execute a
DELETE statement. Which of the following methods in Statement can be used to exe-
cute the DELETE statement? (Select all that apply.)
a.
execute(String sql)
b.
executeUpdate(String sql)
c.
executeQuery(String sql)
d.
executeBatch()
e.
runSQL(String sql)
15.
True or False: The cursor of a ResultSet initially points to just before the first row.
16.
True or False: Invoking next() causes an SQLException to occur if the ResultSet is
empty.
17.
What is the effect of invoking relative(5) on a ResultSet object?
18.
True or False: A result set must be scrollable for the previous() method to execute
successfully.
19.
True or False: Invoking updateString(1, “Hello”) on a ResultSet object changes the first
column of the current row of the ResultSet to “Hello”.
20.
True or False: Invoking updateString(1, “Hello”) on a ResultSet object changes the data
in the database that corresponds to the current row.
21.
True or False: The first parameter of a PreparedStatement has the index value 0.
22.
Which method in the Connection interface is used to create a CallableStatement?
a.
createStatement()
b.
prepareCall()
c.
prepareStatement()
d.
createCall()