Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static <T> String toString(Node<T> front) {
- if (front == null) {
- return "null";
- }
- Node<T> curr = front;
- java.lang.String str = "[ " + curr.nodeValue;
- while (curr.next != null) {
- curr = curr.next;
- str += "," + curr.nodeValue;
- }
- str += " ]";
- return str;
- }
Advertisement
Add Comment
Please, Sign In to add comment