Pass by value Linked list

I am trying to rearrange a Singly linked list. The initial list will be 1,2,3,4,5
and they have to be sorted in 1,5,2,4,3. I have the code and I am trying to understand how it works. Basically I am stuck at the concept of pass by value in java.

The complete code

public class Test {
public static void main(String[] args) {

    LinkedLists linkedList = new LinkedLists();
    linkedList.append(1);
    linkedList.append(2);
    linkedList.append(3);
    linkedList.append(4);
    linkedList.append(5);
    linkedList.reorderList();

}}

class Node {
int data;
Node next;

public Node(int data) {
    this.data = data;
}}

class LinkedLists {

Node head;

public void reorderList() {
    if (head == null) {
        System.out.println(head);
        return;
    }
    Node slowPointer = head;
    Node fastPointer = head.next;
    System.out.println(slowPointer.hashCode());
    System.out.println(head.hashCode());
    while (fastPointer != null && fastPointer.next != null) {
        fastPointer = fastPointer.next.next;
        slowPointer = slowPointer.next;// why head value did not change
    }

    Node head2 = slowPointer.next;
    slowPointer.next = null;// why did the head value change here
    LinkedList<Node> queue = new LinkedList<Node>();
    while (head2 != null) {
        Node temp = head2;
        head2 = head2.next;
        temp.next = null;
        queue.push(temp);
    }
    while (!queue.isEmpty()) {
        Node temp = queue.pop();
        temp.next = head.next;
        head.next = temp;
        head = temp.next;
    }

}

public void append(int data) {
    if (head == null) {
        head = new Node(data);
        return;
    }
    Node current = head;
    while (current.next != null) {
        current = current.next;
    }
    current.next = new Node(data);
}}

The value of head does not get changed at line

slowPointer = slowPointer.next;// why head value did not change

But at line

slowPointer.next = null;// why did the head value change here

Why does it change here. Thanks.