4-Linked Lists/07. Linked List Problems_/JavaLinkedListDataStructures/JavaLinkedListDataStructures/LinkedList.java
public void printNodes() {
     if (head  == null) {
         System.out.println("There is no node in the linked list");
     } else {
         Node<T> curr = head;
         int i = 1;
         while (curr != null) {
             System.out.println("Node<T> number " + i + ", the value it stores is " + curr.toString());
             curr = curr.getNext();
             i++;
         }
     }
    }
/**
     * Print all the nodes in the linked list.
     */
Print all the nodes in the linked list.
Print all the nodes in the linked list .
public void printNodes() {
     if (head  == null) {
         System.out.println("There is no node in the linked list");
     } else {
         Node<T> curr = head;
         int i = 1;
         while (curr != null) {
             System.out.println("Node<T> number " + i + ", the value it stores is " + curr.toString());
             curr = curr.getNext();
             i++;
         }
     }
    }
public void printNodes ( ) { if ( head == null ) { System . out . println ( "There is no node in the linked list" ) ; } else { Node < T > curr = head ; int i = 1 ; while ( curr != null ) { System . out . println ( "Node<T> number " + i + ", the value it stores is " + curr . toString ( ) ) ; curr = curr . getNext ( ) ; i ++ ; } } }
Print all the nodes in the linked list.
Print all the nodes in the linked list .