A class that can be used to create stacks in Java, and a test program packaged with it. Be aware that both files begin with a package statement. Package name can be altered if only the stack class is desired.
Both files have explanations of the methods and usage in comments.
Push(int value)
Pop()
Peek()
isFull()
isEmpty()