Stack is a linear data structure that appears like a list. A stack appears like a sequential collection of constituting elements. Array is also a linear data structure that consists of a collection of various elements that have the same data type. An array’s size is pre-decided. It stores all the values at a location known as the index of values.
The Vector class implements a growable array of objects. Vectors fall in legacy classes, but now it is fully compatible with collections. It is found in java.util package and implement the List interface, so we can use all the methods.
Posted August 18, 2022 by Anusha ‐ 6 min read