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

How to sort numbers in java without array?

753


Why collection doesn’t extend cloneable and serializable interfaces?

892


When is finally block not called?

833


can java object be locked down for exclusive use by a given thread? : Java thread

788


What is matcher in java?

741


What is sortedset in java?

795


Java Compiler is stored in JDK, JRE or JVM?

1264


What is fundamental datatype?

746


what is the difference between future and callable interface in java?

890


What are the different types of java?

778


What is independent and dependent variables in research?

659


What are the advantages of inner classes?

762


What is ascii code?

857


What is the vector class in java programming?

790


How do you convert bytes to character in java?

753