what is difference between vector and arraylist?.

Answers were Sorted based on User's Feedback



what is difference between vector and arraylist?. ..

Answer / guest

vector is synchronized . collection object and variable
slow acess. muntable
array list is never snchronized. collection variable fast
acess

Is This Answer Correct ?    16 Yes 1 No

what is difference between vector and arraylist?. ..

Answer / srinivas

Vector is synchronized and compare to array list this slow
access, by defaulst the vector is 10,this is legacy class
Where as arraylist is unsynchronized and fast random
access,in arraylist there is no default size automatically
it is growable once the object is created it will be
allocated,this is advanced class.

Is This Answer Correct ?    10 Yes 2 No

what is difference between vector and arraylist?. ..

Answer / srinu

vector:-
1)Vector is a synchronized.
2)These are Thread safe.
3)performance slow
4)it implements
serializible,list,collection,iterable,Randomaccess,clonable
interfaces.
5)vector is optimum storage management.

Arraylist:-
1)ArrayList is not synchronized.
2)these are not safe.
3)performance is high.
4)it implements
serializible,list,collection,iterable,Randomaccess,clonable
interfaces.
5)ArrayList is not a optimum storage management

Is This Answer Correct ?    5 Yes 0 No

what is difference between vector and arraylist?. ..

Answer / arjun kumar

If we want to arrange a collection of objects into an other object then we will use either ArrayList or Vector. When we use these classes all the objects that are placed in it will be stored sequentially one after the other.

ArrayList : If we want to store same type of objects then we will use ArrayList class.

Vector : If we want to store different type of objects then we will use Vector class.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Java J2EE AllOther Interview Questions

What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose. Infosys 2 In which way does a Primitive data type is passed ? Sun- Microsystems 4 what is the use of declaring constructor as private? Sai- Softech 5 what is difference between global methods and local methods? 1 What is meant by class loader and how many types are there? Apple 1 what is meaning of JIT? 4 What is an abstract class? Wipro 5 what is filters and its use? Virtusa 2 why is multiple inheritance not allowed in java? Elementus-Technologies 7 Differences between jdk 1.4 and 1.5 Wipro 4 is JVM platform dependent or independent..? IBM 6 what is main purpose of abstract class? 5 what is difference between colection and collections? Tech-Mahindra 11 What error occurs if a try-catch-finally statement sequence does not have a catch clause? 2 Explain the difference between scrollbar and scrollpane? 1 Explain the differences between public, private, protected and static? 4 Explain the difference between getAppletInfo and getParameterInfo? 1 Is Cegonsoft Pvt.Ltd. a good Institute? 4 Why only one Class is public in one file? Explain in details. Thanks in Advance. 11 Which method will get invoked first in a stand alone application?

0 Answers  


what is difference between vector and arraylist?.

4 Answers   C DAC, HCL,


How do I find jre path in windows?

0 Answers  


what is acl(access control list)?

1 Answers   Athena, HCL,


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

0 Answers   NSN,


Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?

0 Answers   Cap Gemini,


whatis arguments &what is default argument

2 Answers   CTS,


What is the difference between Eclipse and MyEclipse?

7 Answers   IBM, Wavex,


2. Write a interface "Car" with the following methods void setName(String) String getName() void setColor(String) String getColor() void setModel(long) long getModel()

1 Answers  


what is difference between struts1.2 and struts2.0

1 Answers  


What are maps interfaces in the java collections? : java collections

0 Answers  


What are the classes in the java collection framework? : java collections

0 Answers  


Categories