示例#1
0
 public void pop() { // pops the data on the top of the stack //topand pop
   if (theList.isEmpty()) {
     System.out.println("sorry but the stack is empty");
   } else {
     theList.deleteFirst();
   }
 }
示例#2
0
 // --------------------------------------------------------------
 public long pop() // take item from top of stack
     {
   return theList.deleteFirst();
 }