Sunday, January 25, 2009

wat is the diff B/W Array & Arraylist

Array
=====
An array contain only one datatype
An array doesn't increase or decrease the size dynamically

ArrayList
=========
An arraylist contain more than one datatype
An arraylist increase or decrease the size dynamically

OR

As elements are added to an arraylist,the capacity is automatically increased as required through through reallocation.The capacity can be decreased by calling trimtosize or by setting the capacity property explicitly.

1 comment: