清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
import java.util.LinkedList; /** * java栈数据结构的LinkedList实现 */ public class LinkedListAsStack { LinkedList stack = new LinkedList(); public void push(Object o1) { stack.add(o1); } public Object pop() { return stack.removeLast(); } public Object topEle() { return stack.getLast(); } public boolean isEmpty() { return stack.isEmpty(); } public void clean() { stack.clear(); } }