ArrayList < Javapedia < TWiki

TWiki . Javapedia . ArrayList

Home | Help | Changes | Index | Search | Go

ArrayList

A Java class that is a member of the Java Collections Framework which implements the List interface. ArrayList should be preferred over Vector as it has a cleaner API and does not force the use of synchronization when it is not needed. The ArrayList can easily be synchronized by using the Collections.synchronizedList(List) method thus obsoleting the Vector class.

The performance characteristics of an ArrayList are such that read operations, like get(int), are fast while insert operations, like add(Object), are slower. If you need a List designed for frequent inserts then consider the LinkedList.

Also See

Using ArrayList and LinkedList



Discussion about ArrayList

----- Revision r4 - 31 Aug 2003 - 01:27:51 - Main.redwolf