-
- private class IntNode {
- private int data;
- private IntNode next;
-
- IntNode(int value) {
- setData(value);
- setNext(null);
- }
-
- IntNode(int value, IntNode nextNode) {
- setData(value);
- setNext(nextNode);
- }
-
- private int getData() {
- return data;
- }
-
- private void setData(int value) {
- data = value;
- }
-
- private IntNode getNext() {
- return next;
- }
-
- private void setNext(IntNode nextNode) {
- next = nextNode;
- }
-
- }
-
- private IntNode headNode;