private int top;
public SeqStack(int capacity) {
}
public SeqStack()
{this(10);
}
回true
return this.top__== -1________; } public boolean push(E element){ //元素element 入栈,若public boolean isEmpty(){ //判断栈是否为空,若空栈返this.value=new Object[Math.abs(capacity)]; this.top=-1; 操作成功返回true
if(element==null) return __false_______; if(this.top==value.length-1){ Object[] temp =this.value; this.value=new Object[temp.length*2]; for(int i=0;i<temp.length;i++) this.value[i]=temp[i];}
this.top___++_______;
this.value[this.top]=___element________; return ___true_____; }}