/** Example 5
//

*/
public class TestPile3
{
  public static void main (String [] args)
  {
     Pile pile;
	  int  myValue;
	  IntNode myIntNode;
	  
	  pile = new Pile();
	  
	  pile.push (10);
//	  System.out.println (pile.value);
//	  System.out.println (pile.next);
     myIntNode= pile.getLast();
	  System.out.println (myIntNode.value);
	  System.out.println (myIntNode.next);
     pile.push (20);
     myIntNode= pile.getLast();
	  System.out.println (myIntNode.value);
	  System.out.println (myIntNode.next);
	  pile.push (30);
     myIntNode= pile.getLast();
	  System.out.println (myIntNode.value);
	  System.out.println (myIntNode.next);
	  while (myIntNode != null)
	  {
	    System.out.println (myIntNode.value);
  	    System.out.println (myIntNode.next);
	    myIntNode = myIntNode.next;
     } // end while 

	   
	}// end main
	}// end class