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 the two types of polymorphism?

591


Which operator cannot overload?

541


What is rtti in c++?

625


How do you traverse a btree in backward in-order?

620


the maximum length of a character constant can be a) 2 b) 1 c) 8

600






What is the role of copy constructor in copying of thrown objects?

596


What is the benefit of learning c++?

547


Why Pointers are not used in C++?

622


What is jump statement in C++?

615


What is an adaptor class or wrapper class in c++?

604


Differentiate between realloc() and free().

594


What are the sizes and ranges of the basic c++ data types?

587


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

603


What is general form of pure virtual function? Explain?

511


What is the difference between containment and delegation?

702