title: How to make a reverse string using a for loop?
body: <p>I need to have my code output the String in reverse order. For example, the output should have "code" return as "edoc". This is what I have done so far.</p>
  
  <pre><code>public String reverseString(String str) {
   String res = "";
  
  for (int i = 0; i &lt;= str.length()-1; i++) {
     res = res + str.charAt(i);
   }
    return res;
  }
  </code></pre>