Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Node<T>
- {
- public T data;
- public Node<T> next;
- public Node()
- {
- data = null;
- next = null;
- }
- public Node(T data)
- {
- this.data = data;
- this.next = null;
- }
- public Node(T data, Node<T> next)
- {
- this.data = data;
- this.next = next;
- }
- public String toString()
- {
- return data.toString();
- }
- }
Add Comment
Please, Sign In to add comment