title: Java .charAt(i) comparison issue
body: <p>Why when comparing a char against another it must be taken also from a string? For example;</p>
  
  <p><em>This does not work</em></p>
  
  <pre><code>   while(i &lt; t.length() &amp;&amp; zeroCount &lt; 5) {
          if(t.charAt(i) == 0){
              zeroCount++;
          }
          i++;
      }
  </code></pre>
  
  <p><em>Nor does this</em></p>
  
  <pre><code>char zero = 0;
  
        while(i &lt; t.length() &amp;&amp; zeroCount &lt; 5) {
              if(t.charAt(i) == zero){
                  zeroCount++;
              }
              i++;
          }
  </code></pre>
  
  <p>The only way I managed to get it working is like this...</p>
  
  <pre><code>String zeros = "0000000000";
  
        while(i &lt; t.length() &amp;&amp; zeroCount &lt; 5) {
              if(t.charAt(i) == zeros.charAt(i)){
                  zeroCount++;
              }
              i++;
          }
  </code></pre>
  
  <p>Can anyone explain if am doing something wrong, or if it is just not acceptable to do it like the top 2 examples. If so, why?</p>