final class MyStack {
private int top;
private int [] stack;
public MyStack(int size)
{ top = 0;
stack = new int[size]; }
public MyStack push(int val) {
this.stack[this.top++] = val;
return this; }
public int pop() {
int val = this.stack[--this.top];
return val; }
}
Contents    Page-10    Prev    Next    Page+10    Index