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
When do we use synchronized blocks and advantages of using synchronized blocks?
Explain about doubly linked list
What does this () mean in java?
What is the transient keyword?
What does @param args mean in java?
How do you convert an int to a double in java?
Explain restrictions for using anonymous inner classes?
Why is java architectural neutral?
When does an object becomes eligible for garbage collection in java?
What is difference between fileinputstream and filereader in java?
What is identifier in java?
Is stringwriter thread safe?
How to check if a list is sorted in java?
Can we sort array in java?
How to create a custom exception?