import java.util.*;

// Documentacion clase Stack: https://docs.oracle.com/javase/7/docs/api/java/util/Stack.html


public class testStackDouble {

   public static void main (String [ ] Args) {

      System.out.println ("Pila:");

      Stack<Double> s = new Stack<Double>();

      // agregar
      s.push(1.0);
      s.push(2.3);
      s.push(3.2);
      s.push(4.8);
      s.push(5.8);
      s.push(6.2);

      while(!s.empty()) {
         // sacar de la pila
         System.out.println(s.peek());
         s.pop();
      }

   }

}