define vector method in java
Answers
Answered by
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
Business Studies,
5 months ago
English,
5 months ago
Math,
9 months ago
Science,
1 year ago
Economy,
1 year ago