Question :What is the difference between ArrayList and Vector? (JavaUtil)
Answer :a.Internally, both the ArrayList and Vector hold onto their contents using
an Array. A Vector defaults to doubling the size of its array, while the
ArrayList increases its array size by 50 percent.
b.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.
c.Vector is synchronized where as ArrayList is not synchronized
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Friday, March 13, 2009
What is the difference between ArrayList and Vector? (JavaUtil)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment