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
hr interview how many minutes asking question
What is an eror in java?
How to sort an array in java without using sort method?
Can vector have duplicates in java?
what is object-oriented programming in java?
Can a class be a super class and a sub-class at the same time? Give example.
5 Coding best practices you learned in java?
Explain importance of inheritance in java?
What is a instance variable in java?
How do you identify if jvm is 32-bit or 64-bit from java program?
What an i/o filter?
Explain the difference between extends thread vs implements runnable in java?
What is the benefit of inner / nested classes ?
Explain about assignment statement?
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?