ArrayList vs. Vector - which is better for webapps?
I've always thought that it's best to use Vectors in Beans or ActionForms because they are synchronized. However, everytime I write one, I get the feeling that I might as well just use an ArrayList. What do you think? The different between the two is that an ArrayList is unsynchronized (seems strange to me since the it does implement Synchronized - the JavaDocs don't lie do they?). It is easy enough to create a synchronized ArrayList using the following code:
Collections.synchronizedList(new ArrayList());
I like ArrayList better, and I'd like to use it - should I just synchronize it on creation, or use Vectors?
Posted by Dennis Doubleday on January 02, 2003 at 05:55 PM MST #
Posted by Kurt Wiersma on January 02, 2003 at 06:55 PM MST #
Posted by Paul Yunusov on January 03, 2003 at 12:45 AM MST #
Posted by Brad Smith on January 04, 2003 at 03:58 PM MST #
Posted by 164.164.160.187 on February 10, 2005 at 10:54 AM MST #
Posted by Rajesh Kumar on December 28, 2005 at 01:29 PM MST #
Posted by 220.225.142.21 on December 29, 2005 at 10:51 AM MST #
Posted by 203.99.195.2 on May 04, 2006 at 07:29 AM MDT #
Posted by 59.144.1.220 on July 03, 2006 at 12:45 PM MDT #
Thanks to java .. There are too much alternatives ways than any other programming. AND BTW keep it simple for maintainence
Posted by kapil on December 16, 2008 at 03:32 AM MST #
Thanks to java .. There are too much alternative ways than any other programming. AND BTW keep it simple for maintainence
Posted by kapil on December 16, 2008 at 03:33 AM MST #
Thanks to java .. There are too much alternative ways than any other programming. AND BTW keep it simple for maintainence
Posted by kapil on December 16, 2008 at 03:33 AM MST #
Posted by kapil on December 16, 2008 at 03:36 AM MST #