title: Not Able to set A parameter of a object of my class via setter when taking String From EditText But same can be done When Hardcoded string is passed
body: <p>CUSTOM CLASS CODE:</p>
  <pre><code>package com.example.accounts;
  public class PartyModel {
  
      private int parId;
      private String parName;
      private String parType;
      private String parOwner;
      private String parOwnerContact;
  
      public PartyModel() {
              }
  
      public PartyModel(int parId, String parName, String parType, String parOwner, String parOwnerContact) {
          this.parId = parId;
          this.parName = parName;
          this.parType = parType;
          this.parOwner = parOwner;
          this.parOwnerContact = parOwnerContact;
      }
  
      public int getParId() {
          return parId;
      }
  
      public void setParId(int parId) {
          this.parId = parId;
      }
  
      public String getParName() {
          return parName;
      }
  
      public void setParName(String parName) {
          this.parName = parName;
      }
  
      public String getParType() {
          return parType;
      }
  
      public void setParType(String parType) {
          this.parType = parType;
      }
  
      public String getParOwner() {
          return parOwner;
      }
  
      public void setParOwner(String parOwner) {
          this.parOwner = parOwner;
      }
  
      public String getParOwnerContact() {
          return parOwnerContact;
      }
  
      public void setParOwnerContact(String parOwnerContact) {
          this.parOwnerContact = parOwnerContact;
      }
  }
  
  </code></pre>
  <p>ACTIVITY CODE (WHERE VALUES ARE PASSED TO SETTER OF PARTYMODEL CLASS) In this activity , i am adding the partyModel Object to my database , when the values are taken from hard-coded string , it worked perfectly and when the value is taken from the editText Values are not getting set:</p>
  <pre><code>package com.example.accounts;
  
  import androidx.appcompat.app.AppCompatActivity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  
  public class AddNewParty extends AppCompatActivity {
  
      EditText etPartyName,etPartyType,etPartyOwner,etPartyOwnerContact;
      Button btnCreate;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_add_new_party);
  
  
          etPartyName=findViewById(R.id.et2PartyName);
          etPartyType=findViewById(R.id.et2PartyType);
          etPartyOwner=findViewById(R.id.et2PartyOwner);
          etPartyOwnerContact=findViewById(R.id.et2OwnerContact);
          btnCreate=findViewById(R.id.btn2Create);
  
          MyDbHandler db = new MyDbHandler(AddNewParty.this);
  
          PartyModel partyModel = new PartyModel();
  
          partyModel.setParName(etPartyName.getText().toString());
          partyModel.setParType(&quot;Trader&quot;);
          partyModel.setParOwner(&quot;Mr. XYZ&quot;);
          partyModel.setParOwnerContact(&quot;9810454563&quot;);
  
  
          btnCreate.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  db.addParty(partyModel);
                  Intent intent = new Intent(AddNewParty.this,com.example.accounts.MainActivity.class);
                  startActivity(intent);
              }`
          });
       }
  }
  </code></pre>