public IntegerStack copy() {
    IntegerStack res=new IntegerStack(data.length);
    res.count=count;
    for(int i=0;i<count;i++)
      res.data[i]=data[i];
    //    in most cases actually empty stacks are cloned in JEL
    //    System.arraycopy(data,0,res.data,0,count);
    return res;
  };