📜  爪哇节点<E>- C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:39.710000             🧑  作者: Mango

代码示例1
import java.util.*;

public class SinglyLinkedList {

    private class Node {
        private E element;
        private Node next;

        public Node(E e, Node n) {
            element = e;
            next = n;
        }

        public E getElement() { 
            return element; 
        }

        public Node getNext() { 
            return next; 
        }

        public void setNext(Node n) { 
            next = n; 
        }
    } 
}