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

When do we use synchronized methods in java?

586


How many types of the indexof method are there for strings?

493


Is treeset sorted in java?

588


What is are packages?

591


Which is faster string or stringbuilder?

522






What is a final class in java?

547


What does those terms actually mean included in the j.d.k i.6?

1608


can used Protected Class outside Function.?

616


What is callablestatement? How you can call stored procedure to pass in parameter?

546


Why are functions called methods in java?

538


Is there a sort function in java?

577


Can we initialize the final blank variable?

588


What is isa relationship?

569


What is null in java?

525


Give reasons supporting that string is immutable.

500