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

hr interview how many minutes asking question

2002


What is an eror in java?

999


How to sort an array in java without using sort method?

857


Can vector have duplicates in java?

894


what is object-oriented programming in java?

1004


Can a class be a super class and a sub-class at the same time? Give example.

1481


5 Coding best practices you learned in java?

988


Explain importance of inheritance in java?

973


What is a instance variable in java?

994


How do you identify if jvm is 32-bit or 64-bit from java program?

918


What an i/o filter?

963


Explain the difference between extends thread vs implements runnable in java?

1078


What is the benefit of inner / nested classes ?

944


Explain about assignment statement?

988


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

995