| Author |
What is the difference between Vector and ArrayList
|
Mathews P Srampikal
Ranch Hand
Joined: Nov 26, 2002
Posts: 211
|
|
|
Can anybody explain the difference between Vector and ArrayList.
|
Thanks,
Mathews
|
 |
Eric Lidell
Greenhorn
Joined: Jul 02, 2003
Posts: 20
|
|
Vector is a legacy class which has been added to collections and ArrayList is a collections. The main difference is Vector class is synchronized and Arraylist isnt. However u can get a synchronized version of ArrayList using the static functions in Collections.
|
 |
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
|
|
Here's my Collections Crib Sheet drastially reduced from a Sun Tech Tip newsletter. I keep it handy rather than memorize 10 classes implementing 3 interfaces. It gives some brief tips about how to choose one collection type over another.
|
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
|
 |
Mathews P Srampikal
Ranch Hand
Joined: Nov 26, 2002
Posts: 211
|
|
|
Hi Simon....what is meant by leagacy Class and Vector is synchrinized???Pls explain.
|
 |
 |
|
|
subject: What is the difference between Vector and ArrayList
|
|
|