Overloading Java function (insert into binary tree)
Just have one insert method call the other. In your code, that would look like:

public final class BinaryTree {

    public Node head;

    public BinaryTree() {
        this.head = null;
    }

    private class Node {
        private final int data;
        private final Node left;
        private final Node right;
        private int size;

        public Node(final int d) {
            this.data = d;
            this.left = null;
            this.right = null;
            this.size = 1;
        }
    }

    public Node insert(final int d) {
        if (this.head == null) {
            this.head = new Node(d);
            return this.head;
        }

        return this.insert(this.head, d);
    }

    private Node insert(final Node n, final int d) {
        if (n == null) {
            return new Node(d);
        }

        n.size++;
        if (n.left == null) {
            return this.insert(n.left, d);
        }
        if (n.right == null) {
            return this.insert(n.right, d);
        }
        if (n.left.size &lt;= n.right.size) {
            return this.insert(n.left, d);
        }
        if (n.left.size &gt; n.right.size) {
            return this.insert(n.right, d);
        }
        return null;
    }
}