title: Error: Cannot Find Symbol from for loop
body: <p>So my code is trying to find if a string is similar to another target string (target already defined). It makes a score based on how many letters are similar in both strings. However, in my for loop, I get a Cannot Find Symbol error for the m used in defining tChar, but it's been used to define iChar... I'm so confused. Is there a better way to do this?</p>
  
  <pre><code>public int score(String input){
      int score;
      char iChar, tChar;
      for (int m=0;m&lt;input.length();++m)
          iChar = input.charAt(m);
          tChar = target.charAt(m);
          if (iChar == tChar)
              score = score + 1;
          else
              score = score;
      return score;
  }
  </code></pre>