public class LinkedList<E> { private Node<E> first; //头节点 尾节点 private Node<E> last; int size; //大小 public LinkedList() { } private static class Node<E> { E item; Node<E> prev; Node<E> next;
public Node(Node<E> prev, E item, Node<E> next) { this.item = item; this.prev = prev; this.next = next; } }