All About Class Stack in Java

The Stack class represents a Last In First Out (LIFO) structure of Objects in Java.
The structure of Stack class is given below:

public class java.util.stack extends Java.util.vector{
//constructor
public stack();
//creates a stack with no elements in it.
//Methods
public boolean empty();
public Object peek();
public Object pop();
public Object push(Object item);
public int search(Object itemToSearch);  
}
 
All About Class Stack in Java All About Class Stack in Java Reviewed by Animesh Chatterjee on September 06, 2018 Rating: 5

No comments:

Powered by Blogger.