What is an array and a vector? How they different from each
other?
Answer Posted / manjusinga
Arrays group values and permit fast access by numeric
index. Vectors are a variant of arrays that also permit
fast access by numeric index.
They differ from each other in this way.
vector can grow and shrink dynamically where as array
cannot.
vectors can be synchronised where as arrays cannot be.
vecotrs are implemented from list interface where as arrays
are primitive datatypes.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is lifetime variable?
How do you create an array in java?
How to use arraylist in java netbeans?
State some advantages of java?
Is there a sort function in java?
In which order the iterator iterates over collection?
Which data type is class in java?
What is adapter in java?
Explain about the main() method in java?
Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?
What is encapsulation in java?
What is string and its types?
What is difference between calling start() and run() method of thread?
Explain garbage collection in java?
How to create an interface?