Узел в Java
public class Node {
public String data;
private Node next;
public Node(String data) {
this.data = data;
this.next = null;
}
public void setNextNode(Node node) {
this.next = node;
}
public Node getNextNode() {
return this.next;
}
}
Eager Elk