//  Data Structures with Java by John R. Hubbard
//  Copyright McGraw-Hill, 2001
//  Problem 6.16 on page 121
//  Testing another bottom(Stack) method

import java.util.Stack;

public class Pr0616
{ public static void main(String[] args)
  { Stack kids = new Stack();
    kids.push("Sara");
    kids.push("John");
    kids.push("Andy");
    kids.push("Mike");
    System.out.println(kids);
    System.out.println(bottom(kids));
    System.out.println(kids);
  }
  
  private static Object bottom(Stack stack)
  { return stack.firstElement();
  }
}
  