Inserting nodes into a singly linked list based on size of number
You don't need the else if(pointer.next == null) case, it's covered by if (!inserted).
Declare variables in as small a scope as possible to increase readability. inserted and pointer aren't needed until the while loop.
You can save a nesting level if you put your code into a insertSorted method, and then call printList afterwards in the calling method. That way, you can write the initial head insert as a guard clause and thus save the else.
You could also save the break by adding &amp;&amp; !inserted to the while clause.
many of your comments just repeat the code they comment on, and are thus not really needed.
// Insert at end. is quite misleading, as the insert doesn't happen at the end of the list.


With all these changes, your code already looks a bit cleaner:

if (head == null || term.getNumber() &gt; head.data.getNumber()) {
    insertAtHead(term);
    return;
}

Node pointer = head;
boolean inserted = false;
while (pointer.next != null &amp;&amp; !inserted) {
    if (term.getNumber() &gt; pointer.next.data.getNumber()) {
        insertAfter(term, pointer);
        inserted = true;
    }
    pointer = pointer.next;
}

if (!inserted) {
    //If not inserted it must be the smallest so add to the end.
    insertAfter(term, pointer);
}


You could also return early after inserting, and thus get rid of the inserted variable:

// guard clause for head insert

Node pointer = head;
while (pointer.next != null) {
    if (term.getNumber() &gt; pointer.next.data.getNumber()) {
        insertAfter(term, pointer);
        return;
    }
    pointer = pointer.next;
}

//If not inserted it must be the smallest so add to the end.
insertAfter(term, pointer);


But you still have a separate case for the last insert which is a bit ugly. You should be able to get rid of it with something like this:

// guard clause for head insert

Node pointer = head;
while (pointer.next != null &amp;&amp; term.getNumber() &lt; pointer.next.data.getNumber()) {
    pointer = pointer.next;
}
insertAfter(term, pointer);