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 is byte data type?
Can we have return statement in finally clause? What will happen?
What is diamond operator in java?
What java is used for?
What is boolean keyword in java?
What is a container in a gui?
Why does java have different data types for integers and floating-point values?
Can you give names of Container classes?
Name few "optional" classes introduced with java 8 ?
How do you check if a string contains only numeric digits?
What is exception hierarchy in java?
What are different types of inner classes ?
Give me some null interfaces in java?
Explain the access modifiers for a class, method and variables?
how can you catch multiple exceptions in java?