This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi Jeane: Thanks for the hints, if i got return from database more than one record, like a list of record, how do I implemented? For example, select id, first,last,street from table1, it will return like thoudsand of records, I want to loop through all the record and display to the user. Many thanks for the help
You have to use the JdbcTemplate class query(SQL, params, new MyRowMapper()). Where MyRowMapper is an implementation of the RowMapper, which will map individual rows to objects of your choice as shown below For a detailed example, of all the classes involved, visit this blog post