Difference between a Vector and an Array in Java


  1. Vector is a dynamic array, whose size can be increased, where as an array size can not be changed.
  2. Reserve space can be given to Vector, where as array can not.
  3. Vector is a Class, where as array is not.
  4. Vector can be stored any type of objects, where as an array can stored only homogeneous values.
  5. Vector implements List interface, where as an array is primitive data type.
  6. Vector is synchronized, where as array is not.

No comments:

Post a Comment