Sunday, 22 February 2015

What is the difference between a Vector and an Array. Discuss the advantages and disadvantages of both?

- Vector can contain objects of different types whereas array can contain objects only of a single type.
- Vector can expand at run-time, while array length is fixed.
- Vector methods are synchronized while Array methods are not

No comments:

Post a Comment