Single Linked List in reverse order Java : <p>How to write a code for printing Single linked list in reverse order?</p>

<pre><code>private class Elem {

    private int data;
    private Elem next;

    public Elem(int data, Elem next) {
        this.data = data;
        this.next = next;

    }

    public Elem(int data) {
        this(data, null);
    }
}
private Elem first = null, last = null;
</code></pre>
