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 is the difference between equal to (==) and assignment operator (=)?

827


Differentiate between a constructor and a destructor in c++.

818


What are function prototypes?

1016


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1780


What is data types c++?

809


Difference between overloading vs. Overriding

851


What is the difference between a baller and a reference in C++?

843


How do I use arrays in c++?

799


Is c++ fully object oriented?

766


Is facebook written in c++?

790


Explain queue. How it can be implemented?

919


What is a terminating character in c++?

1068


How do you master coding?

840


Is dev c++ free?

818


Is ca high or low level language?

861