What is the result?

Given the code fragment:

Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with the dbURL, userName, and passWord exists
The Employee table has a column ID of type integer and the SQL query matches one record.
What is the result?
A. Compilation fails at line 14.
B. Compilation fails at line 15.
C. The code prints the employee ID.
D. The code prints Error.

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “What is the result?

  1. D, ResultSet instance is indexed to the above of first column, must call before line 15 :rs.next();

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.