exam questions

Exam 1z0-809 All Questions

View all questions & answers for the 1z0-809 exam

Exam 1z0-809 topic 1 question 106 discussion

Actual exam question from Oracle's 1z0-809
Question #: 106
Topic #: 1
[All 1z0-809 Questions]

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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
laura_lu93
Highly Voted 3 years, 5 months ago
Answer is D. ResultSet position is before firt line, we should use rs.next()
upvoted 13 times
...
steefaand
Most Recent 6 months ago
Selected Answer: D
Answer is D. ResultSet is not moved to first row using next() method and SQLException is thrown which is caught and Error is printed.
upvoted 1 times
...
iSnover
6 months, 1 week ago
Selected Answer: D
Answer is D. ResultSet position is before firt line, we should use rs.next()
upvoted 1 times
...
duydn
10 months, 2 weeks ago
using rs.next() to move to the first record.
upvoted 1 times
duydn
10 months, 2 weeks ago
and I think the answer should be throw an exception(SQLException)
upvoted 1 times
...
...
Ohayou
2 years, 4 months ago
Answer is D
upvoted 1 times
...
Svetleto13
3 years, 2 months ago
D,tested
upvoted 2 times
...
Sigamani
3 years, 2 months ago
D is correct
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago