by fipi on Wed Jun 20, 2007 9:46 pm
Hi, I was just wondering if in some cases collections can use less memory than arrays. Collections (like an ArrayList) are simply objects linked to each other with no maximum size, right? But arrays allocate memory for their contents when they are created, right? (Correct me if I'm wrong, please.) So, for example, would an ArrayList with 50 objects use less memory than an array with a length of 1000 but only containing 50 objects?
(\__/)
(='.'=)
(")_(")
This is bunny. Help bunny gain world domination by copying him into your signature.
"Efficiency is intelligent laziness." ~David Dunham