Print the Elements of a Linked List

  • + 0 comments

    Java 8 SinglyLinkedListNode current = head; while (current != null) { System.out.println(current.data); current = current.next; }