Computer Science, asked by raki91, 9 months ago

define vector method in java​

Answers

Answered by SaHaBji07
0

Answer:

Java Vector class comes under the java.util package. The vector class implements a growable array of objects. Like an array, it contains the component that can be accessed using an integer index.

Vector is very useful if we don't know the size of an array in advance or we need one that can change the size over the lifetime of a program.

Vector implements a dynamic array that means it can grow or shrink as required. It is similar to the ArrayList, but with two differences-

Vector is synchronized.

The vector contains many legacy methods that are not the part of a collections framework

Similar questions