View Single Post
  #6 (permalink)  
Old 11-04-2007, 04:28 PM
JavaBean's Avatar
JavaBean JavaBean is offline
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
If the data structure needs to grow, then you should not use arrays because arrays are defined to have size. To make an array grow, you need to redefine it and copy previous data to the new one which is cpu consuming.

You can use Vector or ArrayList! Vectors/ArrayLists can grow when necessary automatically.. You will just need to call their add methods to add a new item.
Reply With Quote