public class Stack implements StackI {
private A[] a= (A[])new Object[5];
// "private A[] a= new A[5];" geht aus historischen Gruenden nicht
private int tos=0;
public void push(A n) {
a[tos]=n;
tos++;
}
public A pop() {
tos--;
return a[tos];
}
public boolean isempty() {
return tos==0;
}
public String toString() {
String s="";
for (int i=0; i