12

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
  • 94,125
  • 30
  • 188
  • 241
Murali
  • 341
  • 2
  • 7
  • 24

1 Answers1

10

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ć
  • 63,078
  • 28
  • 122
  • 148