title: How to reverse LinkedList in java
body: <p>Please accept my apologies first, but I could not reverse my Linked List in java..</p>
  
  <p>I have class and inner class:</p>
  
  <pre><code>MyList{
  
  class Element{
  private Element next;
  
  public Element getNext(){return next;}
  }
  
   public void reverseMyList(Element curr) {
  
          if (curr.next == null) {
              head = curr.next;
              return;
          }
          reverseMyList(curr.next);
          while (curr.next != null) {
              curr.next.next = curr.next;
              curr.next = null;
          }
  }//:~
  </code></pre>
  
  <p>I need to reverse my List, I am using method reverseMyList, which needs Element curr.
  If my way of thinking in this case is correct ?</p>
  
  <p>Thank you in advance!</p>