Stack Class
A Stack is a data structure where elements can be inserted and deleted from the front end also known as the ‘Top’ of the stack.
Insertion in Stack is given a standard name Push and deletion is given a standard name Pop. This class can also be referred to as the subclass of Vector. The Stack class in Java is an extension of the “Vector” class.