package cn.edu.bjut.chapter6; import java.util.LinkedList; public class MyStack { private LinkedList list; public MyStack() { list = new LinkedList(); } public void push(E e) { list.push(e); } public E pop() { return list.pop(); } public int size() { return list.size(); } public boolean isEmpty() { return list.isEmpty(); } }