Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between Array and vector?

Answer Posted / meghana

Array:
1)Size of array need to be declared in advance.
2)Once declared array can't grow in size.
3)Array can store primitive data types.like int,char,...
Vector:
1) No need to declare the size of vector. You may give its
size & you may not.
2) Vector can always grow in size if you start adding more
element to it than your declared size.
3) Vector can store only object references. Storing
primitive data types is not possible in case of vectors.

Is This Answer Correct ?    25 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the four versions of java?

1017


What is the purpose of abstract class?

1017


Can two objects have same hashcode?

1005


Can you change array size in java?

968


What is dynamic array in java?

1032


Give any two differences between C++ and java.

1150


How do you do math powers in java?

1066


Explain about member inner classes?

1104


How do you write a good declaration?

988


Is .net better than java?

1017


What is ide with example?

980


what is singleton class in java?

1059


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

957


What is the use of accept () method in java?

1098


Which number is denoted by leading 0x or 0x in java?

1047