title: Android Studio Buttons Not Displaying Output
body: <p>For this project, I have two strings, and I have four buttons. The first button is supposed to combine the two strings together, the second button is supposed to compare the strings, the third button counts the vowels in the two strings, and the last button is a reset button. My issue is that only the Reset button is working. The other three buttons are not displaying an Output at the bottom, can someone please help me with this?</p>
  <p><strong>MainActivity.java</strong></p>
  <pre><code>
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  
  
  
  public class MainActivity extends AppCompatActivity {
      Button btnCompareString,btnreset,btnAddBothString,btnCountCharacter;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          final EditText txtString1=(EditText) findViewById(R.id.txtString1);
          final EditText txtString2=(EditText) findViewById(R.id.txtString2);
          final TextView lblOutput=(TextView) findViewById(R.id.lblOutput);
  
  
  
          btnAddBothString =(Button) findViewById(R.id.btnAddBothString);
          btnAddBothString.setOnClickListener(new View.OnClickListener()
          {
              @Override
              public void onClick(View v) {
                  String string1=txtString1.getText().toString();
                  String string2=txtString2.getText().toString();
  
                  System.out.println(&quot;\nString 1=&quot;+string1+&quot;\n&quot;);
                  lblOutput.setText(&quot;Output: &quot;+string1+&quot; &quot;+string2);
  
              }
          });
  
          btnCompareString =(Button) findViewById(R.id.btnCompareString);
          btnCompareString.setOnClickListener(new View.OnClickListener()
          {
  
              @Override
              public void onClick(View v) {
                  String string1=txtString1.getText().toString();
                  String string2=txtString2.getText().toString();
                  if((string1.equals(string2)))
                      lblOutput.setText(&quot;Output: Matching&quot;);
                  else
                      lblOutput.setText(&quot;Output: Not matching&quot;);
  
  
              }
          });
  
          btnCountCharacter =(Button) findViewById(R.id.btnCountCharacter);
          btnCountCharacter.setOnClickListener(new View.OnClickListener()
          {
  
              @Override
              public void onClick(View v)
              {
                  String string1=txtString1.getText().toString();
                  String string2=txtString2.getText().toString();
  
                  int charCount = 0,i;
  
                  String str = string1.toLowerCase();
  
                  for ( i = 0; i &lt; str.length(); i++)
                  {
  
                      if (str.charAt(i) == 'a' || str.charAt(i) == 'e' || str.charAt(i) == 'i' || str.charAt(i) == 'o' || str.charAt(i) == 'u')
                      {
  
                          charCount++;
                      }
  
                  }
  
                  String str2 = string2.toLowerCase();
  
                  for (i = 0; i &lt; str2.length(); i++)
                  {
  
                      if (str2.charAt(i) == 'a' || str2.charAt(i) == 'e' || str2.charAt(i) == 'i' || str2.charAt(i) == 'o' || str2.charAt(i) == 'u')
                      {
  
                          charCount++;
                      }
  
                  }
                  lblOutput.setText(&quot;Output: &quot;+charCount);
  
              }
          });
          btnreset =(Button) findViewById(R.id.btnReset);
          btnreset.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  txtString1.setText(&quot;&quot;);
                  txtString2.setText(&quot;&quot;);
                  lblOutput.setText(&quot;&quot;);
  
  
              }
          });
      }
  }
  
  </code></pre>