diff vector arraylist

Answers were Sorted based on User's Feedback



diff vector arraylist..

Answer / lipu

Both classes are serializable.See the java doc for
clarification.
Please dont misguide readers

Is This Answer Correct ?    6 Yes 0 No

diff vector arraylist..

Answer / mahendar

vector is syncronized ,where as array list is not
syncronized

Is This Answer Correct ?    0 Yes 1 No

diff vector arraylist..

Answer / veerendra kumar

Here these two are belongs to Collections which are
in(java.util package),Diff is:
1.Vector:this class belongs to legasy collection framework
ArrayList:belongs to new Collection framework
2. Vector:it contains key&value pair
like:Vector v=new Vector();
v.add(0,"2");
v.add(1,"5");
ArrayList:it contains value only
3.Vector:it is Synchronized format
ArrayList:not synchronized

Is This Answer Correct ?    0 Yes 1 No

diff vector arraylist..

Answer / chandra

1) Arraylist is not synchronised while vector is
synchronised.

2) ArrayList doesn’t have a constructor for specifying the
incremental capacity, where as Vector has a constructor to
specify the initial capacity and incremental capacity.

3) Vector is serialized but arraylist is not.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Advanced Java Interview Questions

Why doesn’t the focus feature on the tag work in every circumstance?

0 Answers  


How task's priority is used in scheduling?

0 Answers   HCL,


What is the lifecycle of an applet?

2 Answers  


Are enterprise beans allowed to use thread.sleep()?

0 Answers  


how java is os independent language ?

3 Answers  






How to send a request to garbage collector?

3 Answers  


What is the purpose of the notify() method?

0 Answers  


What is a compilation unit?

1 Answers  


Why are some of the class and element names counter-intuitive?

0 Answers  


What are the different approaches to represent an inheritance hierarchy?

0 Answers  


How many ways can a thread be used?

4 Answers   Sun Microsystems,


what is diff between Access modifier and specifier?

5 Answers   L&T,


Categories