Interview Questions

Engineering Interview in Technical Round: What are the differences between vector and array?

Technical Lead Round Interview Questions and Answers


(Continued from previous question...)

Engineering Interview in Technical Round: What are the differences between vector and array?

The interviewer(s) through this question wants to judge your academic knowledge. But at the same time interviewer(s) is also expecting a more professional answer that is different from the one in the text book. Add some example and share situations when you had to work on both the things. Add the thing that is better and when should be used to get optimum result.
E.g. - Vector and ArrayList are very similar. Both of them represent a 'growable array', where you access to the elements in it through an index.
ArrayList is a part of the Java Collection Framework, and has been added with version 1.2, while Vector is an object that is present since the first version of the JDK. Vector, anyway, has been retrofitted to implement the List interface.
After this definition, share the situation that you faced while working on them and your approach.

(Continued on next question...)

Other Interview Questions