title: Android Studio .compareTo and .equals with strings not working
body: <p>I am trying to create a basic create account system (its my first day using android studio so dont judge too harshly) everytime i test the program it simply defaults straight to else even when the two passwords are vastly different. Thank you all very much for your help in advance.   </p>
  
  <pre><code>public class CreateAccount extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_create_account);
  
      Button Submit_btn = (Button) findViewById(R.id.Submit_btn);
  
      final EditText Username_txt = (EditText)findViewById(R.id.Username_txt);
      final EditText Email_txt = (EditText)findViewById(R.id.Email_txt);
      final EditText Password_txt = (EditText)findViewById(R.id.Password_txt);
      final EditText VerifyPassword_txt = (EditText)findViewById(R.id.VerifyPassword_txt);
  
      final TextView Error_txt = (TextView)findViewById(R.id.Error_txt);
  
      final String Username_string = Username_txt.getText().toString();
      final String Email_string = Email_txt.getText().toString();
      final String Password_string = Password_txt.getText().toString();
      final String VerifyPassword_string = VerifyPassword_txt.getText().toString();
  
  
      Submit_btn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              if (!Password_string.equals(VerifyPassword_string)) {
                  Error_txt.setText("Passwords must be matching");
  
              } else {
                  Error_txt.setText("No Error");
              }
        }
  }
  </code></pre>