Page 1 of 1

About Question enthuware.ocpjp.v7.2.1373 :

Posted: Sat Feb 15, 2014 11:47 am
by EpicWestern
Another reason code will not work is that rs.getString(0) is invalid.

Re: About Question enthuware.ocpjp.v7.2.1373 :

Posted: Tue Aug 12, 2014 5:37 pm
by bluster
To the point of the previous poster, it seems inaccurate to state "after the try block ends without any exception".

Note the certainty that invocation "getString(0)" will throw java.sql.SQLException: Invalid column index.

Please explain if possible. That throw is not mentioned in the explanation, and as said above the enunciated premise of the question does not seem to hold.

Re: About Question enthuware.ocpjp.v7.2.1373 :

Posted: Tue Aug 12, 2014 7:32 pm
by admin
You are right. It has now been changed to getString(1).

thank you for your feedback!
Paul.