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


Please Help Members By Posting Answers For Below Questions

What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

621


What is user defined exception in Java?

609


Why parsing is done?

500


What are the methods of object class ?

561


What is static keyword?

589






Why main() method is public, static and void in java ?

591


describe method overloading

533


Why main method is called first in java?

541


Can we use static class instead of singleton?

576


What happens if main method is not static?

489


What is the purpose of void?

534


What is variable explain?

524


Difference between method overloading and method overriding in java ?

564


What is the Scope of Static Variable?

728


what is the difference between the methods sleep() and wait()? : Java thread

513