Page 1 of 1

About Question enthuware.ocpjp.v8.2.1910 :

Posted: Tue Jul 18, 2017 6:24 am
by Asymmetriccat
After reading the explanation, I still don't get what caused the exception at runtime. To the best of my knowledge, the rs will return 2 rows. The rs.next() moves the cursor to the 1st row, then rs.getString(1) will get the id at the 1st row in 1st column.

Anybody can help? Thank you in advance!

Re: About Question enthuware.ocpjp.v8.2.1910 :

Posted: Tue Jul 18, 2017 10:31 pm
by admin
There will be no exception at runtime. That is why option 1 (It will print two ids from the table.) is the correct option.

HTH,
Paul.