Wednesday, August 18, 2010

Vector vs ArrayList vs HashSet

List syncList = Collections.synchronizedList(new ArrayList());

Set syncSet = Collections.synchronizedSet(new HashSet());

Vector is naturally synchronized.

Performance Test Result
#1 :ArrayList
#2 :Vector
#3 : HashSet

Read more: Java Code Geeks: Java Best Practices – Vector vs ArrayList vs HashSet

http://www.javacodegeeks.com/2010/08/java-best-practices-vector-arraylist.html#ixzz0wxSNUeuS

No comments:

Post a Comment