Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Output data

Reply
Thread Tools

Output data

 
 
teser3@hotmail.com
Guest
Posts: n/a
 
      07-07-2008
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
eval of Data::Dumper output not same as original data structure himanshu.garg@gmail.com Perl Misc 4 08-01-2007 01:49 PM
Sony Precision Cinema Progressive Output vs Component 480p Output Otto Pylot DVD Video 1 04-18-2004 09:49 PM
reading output file data as input data Stephen Moon Perl Misc 5 02-29-2004 02:16 PM
Is Fuji S3000 3.2m/pixel output, or 6 m/pixel interpolated output? Peter H Digital Photography 43 12-04-2003 02:35 PM
Output / Debug window output bug? John Bentley ASP .Net 0 09-10-2003 07:38 AM



Advertisments