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
What are the four versions of java?
What is the purpose of abstract class?
Can two objects have same hashcode?
Can you change array size in java?
What is dynamic array in java?
Give any two differences between C++ and java.
How do you do math powers in java?
Explain about member inner classes?
How do you write a good declaration?
Is .net better than java?
What is ide with example?
what is singleton class in java?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
What is the use of accept () method in java?
Which number is denoted by leading 0x or 0x in java?