1
Answer

how andwhy use vector class in java?

Julius Angila

Julius Angila

12y
1.3k
1
hi
 now we want to know that how we can use vector class so describe the implementation proper of this class
Answers (1)
0
Satyapriya Nayak

Satyapriya Nayak

NA 53k 8m 12y
Hi Julius,

Vector implements a dynamic array. It is similar to ArrayList, but with two differences:

Vector is synchronized.

Vector contains many legacy methods that are not part of the collections framework.

Vector proves to be very useful if you don't know the size of the array in advance, or you just need one that can change sizes over the lifetime of a program.

The Vector class supports four constructors. The first form creates a default vector, which has an initial size of 10:


Refer

http://www.tutorialspoint.com/java/java_vector_class.htm


Thanks