Site icon Narayana Tutorial

Vector

Vector

Different between ArrayList and Vector:-
ArrayList
Vector
  • no method is synchronized 
  • ArrayList objects is not thread safe
  • performance is high
  • introduced in 1.2 version and hence non legacy

 

 

  • All  method is synchronized 
  • vector objects is always thread safe
  • performance is low
  • introduced in 1.0 version and hence vector is legacy