diff vector arraylist

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is table mutation and how do you avoid it?

1912


Is a class a subclass of itself?

585


What you mean by COM and DCOM?

609


What is the RMI and Socket?

621


Explain about thread synchronization inside a monitor?

1993






Difference between DurableSubscription and non- DurableSubscription?

1710


What value does readline() return when it has reached the end of a file?

586


Brief description about local interfaces?

622


Explain the advantages and disadvantages of detached objects.

569


Is it possible to stop the execution of a method before completion in a sessionbean?

593


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

3446


How will you pass parameters in RMI? Why do you serialize?

684


What are the purpose of introspection?

674


Name the class that is used to bind the server object with RMI Registry?

1689


What are the types of scaling?

551