kensington45
Technical User
- Jun 26, 2008
- 9
I have something that works with data mapping but was wondering if there was a more efficient way to do this?
Java part:
output:
Please advise.
Java part:
Code:
....
//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:
Code:
//output comma delimeter data
out.print(myMap.get(0));
Please advise.