Files
uni/second/semester2/CT2109/Assignments/Assignment-02/code/Stack.java
2023-12-07 01:19:12 +00:00

14 lines
472 B
Java

/** Abstract Stack interface */
public interface Stack
{
// most important methods
public void push(Object n); // push an object onto top of the stack
public Object pop(); // pop an object from top of the stack
// others
public Object top(); // examine top object on stack without removing it
public boolean isEmpty(); // true if stack is empty
public boolean isFull(); // true if stack is full (if it has limited storage)
}