title: Reversing a String with Recursion in Java
body: <p>Here is some Java code to reverse a string recursively.  </p>
  
  <p>Could someone provide an explanation of how it works?</p>
  
  <pre><code>public static String reverse(String str) {
      if ((null == str) || (str.length() &lt;= 1)) {
          return str;
      }
      return reverse(str.substring(1)) + str.charAt(0);
  }
  </code></pre>
  
  <p>I'm not understanding how this can possibly work.</p>