//******************************************************************** // Decode.java Author: Lewis/Loftus // // Demonstrates the use of the Stack class. //******************************************************************** import java.util.Stack; public class UseStack { public static void main (String[] args) { Stack word = new Stack(); // put objects on the Stack - of class String word.push ("One"); word.push ("Two"); word.push ("Three"); // take elements out of the stack while (!word.empty()) System.out.println (word.pop()); } }