data structure to store query results

Hi,I have a query that returns several rows of data having 4 columns. Which data structure can i use to store it all? (I need to iterate n print out results).Thanks
[185 byte] By [ursaa] at [2007-10-2 3:17:01]
# 1

I think that to first thing you must have a class that represent the single row of the query. To example if the result of your query are article you must have a class Article with the proper field. Than for each row you create a Object of type Article and you add it to a array or a vector. Finally you flow the array or the vector

and print this that you interest.

Excuse for my bad english.

Maxa at 2007-7-15 21:44:24 > top of Java-index,Java Essentials,New To Java...
# 2
> [...]> for each row you create a Object of type Article and> you add it to a array or a vector. Just an advise: use a Collection instead (ArrayList for example).
Franck_Lefevrea at 2007-7-15 21:44:24 > top of Java-index,Java Essentials,New To Java...