Assume that the SQL query matches one record. What is the result of compiling and executing
this code?
A.
The code prints Error.
B.
The code prints the employee ID.
C.
Compilation fails due to an error at line 13.
D.
Compilation fails due to an error at line 14.
Explanation:
The code compiles fine.
A: prints Error: rs.next() fehlt !! Fehlermeldung: Before start of result set
mit rs.next() Aufruf : The code would run fine.
public int getInt(String columnName)
throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as an int
in the Javaprogramming language
SQL Exception: java.sql.SQLException: Before start of result set