My pages
Projects
Communities
java.net
java.net
>
Wiki
>
Javapedia
>
Glossary
>
ArrayList
As the new Java.net infrastructure contains project-level wikis, this main wiki will be shut down in the near future. For wiki page export and general wiki questions please contact the site admin at
communitymanager@java.net
.
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
Topic
ArrayList
. {
Edit
|
Ref-By
|
Printable
|
Diffs
r4
<
r3
<
r2
<
r1
|
More
}
java.net
RSS
Revision r4 - 2003-08-31 - 01:27:51 - redwolf
Parents:
WebHome
>
Glossary