4-Linked Lists/07. Linked List Problems_/JavaLinkedListDataStructures/JavaLinkedListDataStructures/LinkedList.java
public void changeHead(LinkedList<T> destinationList) {
        T currHead = popElement();
        if (destinationList.head == null) {
            // If this is the first element in the destination list , simply
            // add it to the list.
            destinationList.addNode(currHead);
        } else {
            Node<T> next = destinationList.head;
            destinationList.head = new Node<T>(currHead);
            destinationList.head.setNext(next);
        }
    }
/**
     * Move the head element or the first element from this list to
     * the destination linked list as the destination's new head node.
     */
Move the head element or the first element from this list to
the destination linked list as the destination's new head node.
Move the head element or the first element from this list to the destination linked list as the destination ' s new head node .
public void changeHead(LinkedList<T> destinationList) {
        T currHead = popElement();
        if (destinationList.head == null) {
            destinationList.addNode(currHead);
        } else {
            Node<T> next = destinationList.head;
            destinationList.head = new Node<T>(currHead);
            destinationList.head.setNext(next);
        }
    }
public void changeHead ( LinkedList < T > destinationList ) { T currHead = popElement ( ) ; if ( destinationList . head == null ) { destinationList . addNode ( currHead ) ; } else { Node < T > next = destinationList . head ; destinationList . head = new Node < T > ( currHead ) ; destinationList . head . setNext ( next ) ; } }
Move the head element or the first element from this list to
 the destination linked list as the destination's new head node.
Move the head element or the first element from this list to the destination linked list as the destination ' s new head node .
// If this is the first element in the destination list , simply // add it to the list.