Differentiate Vector and ArrayList?

Answers were Sorted based on User's Feedback



Differentiate Vector and ArrayList?..

Answer / pranab dutta

Vector is synchronized
Arraylist is not synchronized.

Is This Answer Correct ?    7 Yes 0 No

Differentiate Vector and ArrayList?..

Answer / pallavi thakare

a)Vector is a synchronized, where as an ArrayList is not
synchronized.
b)arraylist is not leggacy,it introduce JDK 1.7,where vector is leggacy.
c)arraylist uses iterator,where vector used enumration.

Is This Answer Correct ?    4 Yes 0 No

Differentiate Vector and ArrayList?..

Answer / uthrakumar-wipro technologies

array list store only one type of datas ie thier datatype
should be similar


whereas vectore can store different datatype variables ie
withrespect to the <class> datatype....for using vector we
have to convert the data into objects using the following
syntax...


eg:
char <obj>=new char();

Is This Answer Correct ?    4 Yes 2 No

Differentiate Vector and ArrayList?..

Answer / anitha

a)Vector is a synchronized, where as an ArrayList is not
synchronized.

b)when size is going to exceed, the ArrayList size is
double of it's size, where as Vector size is increase half
of its size.

except these two both r roughlt equal.

Is This Answer Correct ?    4 Yes 3 No

Differentiate Vector and ArrayList?..

Answer / chinmay

vector is a legacy class but ArrayList is a collection class
vector is synchronized where as ArrayList is not

Is This Answer Correct ?    1 Yes 0 No

Differentiate Vector and ArrayList?..

Answer / v.kannan

Vector is synchronized where as
Arraylist is not synchronized.
In Array List there is no guarantee elements will be in
order(It will vary System to System)

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More Core Java Interview Questions

String is a immutable objects . it means that string does not change........... But it will be chang......... { String s="kapil"; String s1="raj"; String s=s1; then print(.......) The String has been changed .. how it is possible and why its called immutable objects

7 Answers  


What is mean by collections in java?

0 Answers  


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

0 Answers  


what is server side caching?

0 Answers   AIG,


Can we override private method?

0 Answers  






String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ?

6 Answers   Flextronics, Keane India Ltd,


How to perform linear search in java?

0 Answers  


Is string passed by reference in java?

0 Answers  


What is a java applet? What is an interface?

0 Answers  


Can a class be a super class and a sub-class at the same time? Give example.

1 Answers  


Explain about procedural programming language or structured programming language and its features?

0 Answers  


What does super keyword do?

0 Answers  


Categories