Example #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();
   }
 }
Example #2
0
 public boolean isEmpty() { // checks to see of the list is empty
   return theList.isEmpty();
 }
 public boolean isEmpty() {
   return linkList.isEmpty();
 }
Example #4
0
 // --------------------------------------------------------------
 public boolean isEmpty() // true if stack is empty
     {
   return (theList.isEmpty());
 }
 public boolean isEmpty() {
   return (theList.isEmpty());
 }