About Question enthuware.ocpjp.v7.2.1377 :
Posted: Thu Jan 29, 2015 3:22 pm
This is not best practice:
int supplierID = rs.getInt("SUP_ID");
or
int sid = rs.getInt("SID");
One should use rs.getInt("int_type") when the column type in the table is an int.
----- -----
The question was written like this just to let you know that
if you see it on the exam, it will compile and work.
"An int column in a table can be retrieved using getString()"
http://docs.oracle.com/javase/tutorial/ ... eving.html
Please confirm.
int supplierID = rs.getInt("SUP_ID");
or
int sid = rs.getInt("SID");
One should use rs.getInt("int_type") when the column type in the table is an int.
----- -----
The question was written like this just to let you know that
if you see it on the exam, it will compile and work.
"An int column in a table can be retrieved using getString()"
http://docs.oracle.com/javase/tutorial/ ... eving.html
Please confirm.