1Z0-804 · Question #75
Given the code fragment: Assume that the SQL query matches one record. What is the result of compiling and executing this code?
The correct answer is A. The code prints Error. 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…
Question
Given the code fragment:
Assume that the SQL query matches one record. What is the result of compiling and executing this code?
Exhibit
Options
- AThe code prints Error.
- BThe code prints the employee ID.
- CCompilation fails due to an error at line 13.
- DCompilation fails due to an error at line 14.
How the community answered
(49 responses)- A73% (36)
- B16% (8)
- C4% (2)
- D6% (3)
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
Topics
Community Discussion
No community discussion yet for this question.
