Files

17 lines
268 B
Java

public interface Stack {
// Add to Top
void push(int item);
// Remove from the top
int pop();
// Look at the first item
int peek();
// How many elements
int size();
// Is the stack empty
boolean isEmpty();
}