exam questions

Exam 1z0-809 All Questions

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

Exam 1z0-809 topic 1 question 202 discussion

Actual exam question from Oracle's 1z0-809
Question #: 202
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 and Customer tables are available and each table has id column with a few records and the SQL queries are valid.
What is the result of compiling and executing this code fragment?

  • A. The program prints employee IDs.
  • B. The program prints customer IDs.
  • C. The program prints Exception.
  • D. compilation fails on line 13.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
iSnover
5 months, 4 weeks ago
Selected Answer: B
The answer is B. ResultSet overwrites it.
upvoted 1 times
...
duydn
10 months, 2 weeks ago
Selected Answer: C
C - resource in Try-with-resource is final, cannot re-assign
upvoted 1 times
duydn
10 months, 2 weeks ago
sorry, the correct answer is B rs is take data from Customer
upvoted 1 times
...
...
WilsonKKerll
2 years, 4 months ago
Answer is B.
upvoted 1 times
...
mevlt
2 years, 5 months ago
The answer is B. ResultSet overwrites it.
upvoted 1 times
...
petetsai
2 years, 6 months ago
answer is B , it has "rs = " grabbing customer's results
upvoted 2 times
...
jduarte
3 years, 6 months ago
C The detailed reason is Only one resultSet must be open for statement the code into null pointer exception
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