How is my Java code for stack implementation?
The stack that you have implemented (I guess for an assignment) is too limited because of the following:


It does not support generic types. Since every container class in Java can store any object, I would suggest you to incorporate that facility in your data structure as well.
It has only a limited storage capacity, due to the use of Java array. It would be better to use a container class that can grow dynamically, such as an ArrayList, LinkedList or a Vector.
You should properly handle the boundary condition of popping from an empty stack.
Try to test your main function with a real-life application, such as evaluating a post-fix expression or checking valid parenthesization etc.