11

I would like to use collection classes for adding,removing and retrieving objects in multiple thread.

Collections.synchronizedList and Vector both classes are thread safe. Does any tell me the difference between Collections.synchronizedList and Vector and explain that when should I use Vector and Collections.synchronizedList?

Maroun
  • 91,013
  • 29
  • 181
  • 233
Murali
  • 321
  • 2
  • 7
  • 22

1 Answers1

7

Here are few words on why Vector is an obsolete/deprecated class: Why is Java Vector class considered obsolete or deprecated?

Generally about their difference: In java, Vector and Collections.synchronizedList are all synchronized, what's the difference?

Community
  • 1
  • 1
Boris Pavlović
  • 60,971
  • 26
  • 119
  • 144