Output data

T

teser3

I have something that works with data mapping but was wondering if
there was a more efficient way to do this?

Java part:
.....
//database part here...ResultSet rs
....

List myMap = new ArrayList();

while (rs.next())
{
String firstname = rs.getString("firstname");
String lastname = rs.getString("lastname");
String address = rs.getString("address");
myMap.add(firstname + "," + lastname + "," + address);
}

-----

output:
//output comma delimeter data
out.print(myMap.get(0));


Please advise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top