title: How to print several strings backwards in Java
body: <p>I am trying to take a file full of strings, read it, then print out a few things:</p>
  <ul>
  <li>The string</li>
  <li>The string backwards AND uppercase</li>
  <li>The string length</li>
  </ul>
  <p>There are a few more things, however I haven't even gotten to that point and do not want to ask anyone to write the code entirely for me. After messing around with it for a while, I have it almost completed (I believe, save for a few areas).</p>
  <p>The piece that is tripping me up is the backwards word. We are required to put our output neatly into columns using prinf, but I cannot do this if I read each char at a time. So I tried setting a <code>String backwardsWord = &quot;&quot;;</code> and adding each character.</p>
  <p>This is the piece that is tripping me up:</p>
  <pre><code>for(int i = upperCaseWord.length() - 1; i &gt;= 0; i--)
  {
      backwardsWord += (upperCaseWord.charAt(i) + &quot;&quot;);
  }   
  
      
  </code></pre>
  <p>My issue is that when I print it, the first word works properly. However, each word after that is added to the previous word.</p>
  <p>For example: if I am printing cat, dog, and rat backwards, it shows</p>
  <blockquote>
  <p>TAC</p>
  <p>TACGOD</p>
  <p>TACGODTAR</p>
  </blockquote>
  <p>I obviously want it to read</p>
  <blockquote>
  <p>TAC</p>
  <p>GOD</p>
  <p>TAR</p>
  </blockquote>
  <p>Any help would be appreciated.</p>