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 identity function in c++? How is it useful?

546


What is the difference between object-oriented programming and procedural programming?

689


What is different in C++, compare with unix?

601


If dog is a friend of boy, is boy a friend of dog?

567


What is anonymous object in c++?

628






What is meant by iomanip in c++?

603


What is c++ hiding?

616


What are the two types of comments?

570


What is the use of 'this' pointer?

765


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

999


Describe friend function & its advantages.

708


Explain the use of virtual destructor?

620


What are stacks? Give an example where they are useful.

586


What is a class definition?

609


How do you remove an element from a set in c++?

578