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.
The moose likes Servlets and the fly likes can any body tell how to add resultset in array list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can any body tell how to add resultset in array list" Watch "can any body tell how to add resultset in array list" New topic
Author

can any body tell how to add resultset in array list

vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
hai i am using servlet and mysql can any body tell how to store resultset in array list .i have lot of records .
i have three field sno name address how can i iterate the resultset from arraylist in table format





thanks in advance
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32635
    
215

Create an object representing a row - those three fields. Then as you loop through the result set, create this object and add it to the list.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: can any body tell how to add resultset in array list
 
It's not a secret anymore!