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
Answer 1 : the array is a primitive data type Answer 2 : It depends what do you want to do. If you have a lot of insertion to do the List object may be a good idea, the insertion is simple. On the other hand, insertion in an array is a little bit more complicated, you have to manage yourself the insertion.
Answer 3: an array have more than the length member. It has the clone() method. And it inherit all the member and method of the Object class except the clone method. I hope that the answer is clear enough. If you want more details information take a look at the java Specification. Java Specification YLT
Yves, thanks for the response and the link to the specification. The array itself will already be filled, all I need to do are gets out of it so for my purpose the array is the better way to go over the List.
David - Listen to Dave - an array is an object. Also, if when you are getting things back out of the array, if you're making a copy, then the array is fine. However - if you want to get something out and remove it from the array at the same time, ArrayList is the way to go.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss