|
-
Jun 1st, 2002, 02:05 PM
#6
It probably doesn't matter 99% of the time, but they use memory that you aren't using. By that, I mean that when you create an arraylist, it's default size is 16. If you only add in 3 items, you are wasting a little bit of memory space. When you add the 17th item, it will then expand the size to 32. That means you are wasting 16 elements worth of memory. There is also the tiny bit of overhead calling the add method and remove methods. Again, this little bit of overhead in the grand scheme of things is nothing, most of the time, but if you are all about using as little memory as possible, you should stick with regular arrays. I don't know why, but I felt like getting deeper into the subject. I am now off to use an arraylist for my program...lol.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|