Back to slide -- Keyboard shortcut: 'u'  next        AbstractClassEx.java - Et eksempel på en anvendelse af klassen UnboundedStack.Lecture 8 - slide 7 : 26
Program 2

public class AbstractClassEx {

 public static void main(String[] args){
   UnboundedStack st = new UnboundedStack();
  
   st.push(new Integer(1));
   st.push(new Integer(2));
   st.push(new Integer(3));
   st.toggleTop();
   st.pop();
   
   System.out.println(st);
  }
} // end AbstractClassEx