• Post Reply Bookmark Topic Watch Topic
  • New Topic

where to store results?  RSS feed

 
rahul soni
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see the code DataOnTable.java i writeen my Question?
and what i want




//////////////////////////////////////////////////////////////////////////


[edited to add code tags and make subject more descriptive]
[ August 22, 2005: Message edited by: Jeanne Boyarsky ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a Collection class (or two), rather than a 2D array. All Collection classes are growable.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37393
531
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul,
you should definitely use a collections class like Paul suggeted. For example, an ArrayList. You can always convert back to an array at the end if you need the data in that form.

The ArrayList needs to contain objects. You could use an array of size 6. Even better, you could create a custom object with 6 fields to give them clearer names.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!