Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class Node {
  2.     Node next;
  3.     Object data;
  4.  
  5.     public Node(Object dataValue) {
  6.         next = null;
  7.         data = dataValue;
  8.     }
  9.     public Node(Object dataValue, Node nextValue) {
  10.         next = nextValue;
  11.         data = dataValue;
  12.     }
  13.     public Object getData() {
  14.         return data;
  15.     }
  16.     public void setData(Object dataValue) {
  17.         data = dataValue;
  18.     }
  19.     public Node getNext() {
  20.         return next;
  21.     }
  22.     public void setNext(Node nextValue) {
  23.         next = nextValue;
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement