手写LinkedList
简单的实现了增加和删除方法,以及返回节点个数和返回所有元素值 直接上代码吧 首先创建了一个Node类,前指向,后指向以及数据 package Node; public class Node { private Node pre; private Node next; private Object value; public Node() { } public Node(Node pre, Node next, Object value) { this.pre = pre; this.next = next; this.value = value; } public Node getPre() { return pre; } public void setPre(Node pre) { this.pre = pre; } public Node getNext() { return next; } public void setNext(Node next) { this.next = next; } public Object getValue() { return value; } public void setValue(Object value) { this.value = value; } } 然后是具体实现 import Node.Node; public class