What is the difference between vector and Array?

This question is related to Oracle Interview

Showing Answers 1 - 2 of 2 Answers

vikramaditya Garg

  • Dec 15th, 2005
 

Vector is a dynamic collection whose size increases with addition of more elements.Array's size is not dynamic.Means that vector is based on dynamic memory allocation.

  Was this answer useful?  Yes

Bala

  • Jul 31st, 2007
 

Vector was used in the older version of java where all the methods are synchronised for thread safety, but since it was creating a lot of performance problem ArrayList was introduced where none of the methods are synchronised

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions