Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
You can have an array of Vectors. You can have an array of array of Vectors. You can have a Vector of Vectors. You can have an array of array of Vectors of Vectors of array of array of Vectors...
Henry [ March 10, 2006: Message edited by: Henry Wong ]
Originally posted by Henry Wong: You can have an array of Vectors. You can have an array of array of Vectors. You can have a Vector of Vectors. You can have an array of array of Vectors of Vectors of array of array of Vectors...
You can have a collection within a collection, But it is not a good coding practice to keep on tossing collections within collections. It makes your code hard to understand. This is analogous to storing items in pigeonholes without any labelling. To store items use value objects or data objects (as oppose to storing every attribute in an ArrayList or HashMap). Provide wrapper classes around your collection API classes like ArrayList, Hashmap etc
Thank you never used a wrapper class before. What I need to do is create an unlimited amount of "Vectors"(Can be an array) with the vectors being different lengths each time it is run. I tried an array of vectors and ran into problems.
If you are not sure of the exact number of Vectors that you need, then you can use a dynamic structure like an ArrayList which can grow dynamically. (Also unless you have a compelling reason, you can use an ArrayList instead of a Vector).