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

Is it possible to pass an object of the same class in place of object reference to the copy constructor?

761


Do you know about latest advancements in C++ ?

845


How do you clear a buffer in c++?

713


Describe new operator and delete operator?

818


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2193






What is the output of the following program? Why?

798


what is C++ exceptional handling?

811


What is general form of pure virtual function? Explain?

709


What do you mean by overhead in c++?

788


Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

804


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

735


What is the extension of c++?

689


Do you know what are pure virtual functions?

841


Describe linkages and types of linkages?

757


What is a storage class?

854