• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between Vector and ArrayList classes  RSS feed

 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know the differences between Vector class and ArrayList class other than Synchronized methods..
please.

regards,
Surendar.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main difference I worry about is that Sun recommends you don't use Vector any more. That kind of squashed my interest in the other differences.
 
Sanjaya Sugiarto
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vector is synchronized (thread-safe) and ArrayList is not synchronized, therefore in most cases, when you dont need multi threading you wont use Vector because it gives performance hit (can be only accessed by one thread)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!