What is the Difference between "vector" and "array"?

Answer Posted / kabitirtha koley

The basic difference between those two are:
1.Vector and Arraylist are grownable or shinkable where are
array is not.
2.Vector and Arraylist are implemented from List interface
where as array is a primitive data type
3.Vector is Synchrnized where as arraylist is not
4.For best performance better to use arraylist than vector

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all predefined data types in c++?

813


What is #include iostream h in c++?

862


What do you mean by overhead in c++?

818


What is c++ similar to?

857


How do you show the declaration of a virtual constructor?

741


What does n mean in c++?

850


What is #include sstream?

819


Why do we use iterators?

841


Is dev c++ a good compiler?

719


When is dynamic checking necessary?

807


What is the difference between #define debug 0 and #undef debug?

904


What is a syntax in c++?

887


What is the copy-and-swap idiom?

829


What is c++ iterator?

852


Explain the use of virtual destructor?

836