QUOTE(pbl @ 24 Aug, 2008 - 04:25 PM)

QUOTE(sumlani @ 24 Aug, 2008 - 04:11 PM)

What's the difference between an array class & arraylist class?
An array has a fixed length an ArrayList can expand as required
you can append/add an element to an ArrayList not to an array
You can delete/remove an element from an ArrayList you can't from an array
Arrays are serializabled ArrayList are not but Vectors (that look a lot like ArrayList) are
Thank you, I understand it better now.
QUOTE(Martyr2 @ 24 Aug, 2008 - 04:21 PM)

I am not quite sure what you mean by array class but if you are talking about the difference between an array and an arraylist the arraylist class has several added functions that support dynamic sizing, various methods for searching, sorting and deleting, and provides mechanisms for easy iteration. The ordinary array class doesn't offer such mechanisms or methods and is much more basic.
ArrayLists are good for handling a collection of items that may or may not be primitive data types (like custom objects) and handles expanding the array before it gets full.
Arrays in general have their size defined, are typically used with more basic types like integers, doubles, and character and when you need more space you have to create a new bigger array and copy over the values in some fashion.
However since arrays are not big objects like arraylist they can also be a bit faster and great for storing small number of basic values where you know the number of elements you need to store beforehand.

Thank you for your response, it was very helpful.