An ArrayList will provide better performance but it is not synchronized.
ArrayLists are part of the Java 2 framework.  As long as you do not need
your application to perform in a pre Java 2 environment it is my opinion
that the ArrayList is an attractive option.  The methods of dealing with
ArrayLists are similar to other data types throughout the collections
framework and as such you will have the ability to change your data type in
the future with less effort.  For instance if you decide that you need a Map
or Tree.  That is the goal at least.

Be aware that it is not synchronized and the programmer must provide their
own synchronized methods should they be needed.

Regards,
Craig
Sun Certified Java Programmer


-----Original Message-----
From: Hunter Hillegas [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 12:37 PM
To: Tomcat User List
Subject: ArrayList vs. Vector


I use Vectors in some parts of my Web app and I'm thinking about using
ArrayLists instead...

Any caveats to using them in a Web app environment?

Hunter


Reply via email to