title: unexpected type error
body: <p>I'm new at Java, I study on strings and i want a string to be reversed. Here is my code</p>
  
  <pre><code>String myStr = "abcdef"; String reversed = "";
  for(int j=myStr.length()-1;j&gt;=0;j--) {
      myStr.charAt(j) += reversed;
  }
  </code></pre>
  
  <p>But it gives me an error message:</p>
  
  <pre><code>****.java:14: error: unexpected type
  required: variable
  found:    value
  </code></pre>
  
  <p>But when I print it by <code>System.out.print(reversed)</code>, it prints <code>reversed</code> correctly. What is the difference between variable and value? Why it can give me correct answer in spite of giving me an error message? I'll appreciate your answers, thanks</p>