title: Displaying a string backwards using substring
body: <p>I have here a method that displays a string backward.</p>
  
  <pre><code>public static String ReverseStr(String backward) {
         String newString = "";
         for (int i=0; i&lt;backward.length(); i++) {
            newString = backward.charAt(i) + newString;
         }
         return newString;
  }
  </code></pre>
  
  <p>It works properly but I'd like to do it in another way, that is, using a <code> for </code> loop, getting each character in the string using <code> substring </code> method with two parameters, starting with the last character then concatenates that one-character substring with the new string each time through the loop. <br> <br>
  I tried this:</p>
  
  <pre><code>public static String ReverseStr(String backward) {
         String newString = "";
         for (int i=0; i&gt;backward.length(); i--) {
            String subChar = backward.substring(backward.length()-1);
            newString += subChar;
         }
         return newString;
  }
  </code></pre>
  
  <p>But when I run the program, it displays nothing. Please help me fix the code. Thank you very much!</p>