title: Android Count The Letter
body: <p>I am trying to count how many times the letter A will be output in my program. here is what I have so far...</p>
  
  <pre><code>count.setOnClickListener(new View.OnClickListener() {
         @Override
         public void onClick(View v) {
                 int letter1 = 0;
                 int letter2 = 0;
                 String enter1 = str1.getText().toString();
                 String enter2 = str2.getText().toString();
  
                 for (int i = 0; i &lt; str1.length(); i++) {
                     if (enter1.charAt(i) == "a") {
                         letter1++;
                 }
                 display2.setText(enter1);
             }
         }
     });
  </code></pre>
  
  <p>The error I am getting is:</p>
  
  <pre><code>error: incomparable types: char and String
                     if (enter1.charAt(i) == "a") {
  </code></pre>