title: How can i update my firebase database fields?
body: <p>Good Day.
  I have tried my level best but failed to update the data whenever i enter new "Name","Age" or anything the data entered before is wiped.I want to use push or something else to update the data.But still failing to do that.</p>
  
  <pre><code>nameRef.addValueEventListener(new com.google.firebase.database.ValueEventListener() {
              @Override
              public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
  
  
                  String text = dataSnapshot.getValue(String.class);
                  String ho = name.getText().toString();
  
                  nameRef.setValue(ho);
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
          genderRef.addValueEventListener(new com.google.firebase.database.ValueEventListener() {
              @Override
              public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
                  String text = dataSnapshot.getValue(String.class);
                  String ho = gender.getText().toString();
                  genderRef.setValue(ho);
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
          ageRef.addValueEventListener(new com.google.firebase.database.ValueEventListener() {
              @Override
              public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
             `enter code here`     String text = dataSnapshot.getValue(String.class);
                  String ho = age.getText().toString();
                  ageRef.setValue(ho);
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
          EmailRef.addValueEventListener(new com.google.firebase.database.ValueEventListener() {
              @Override
              public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
                  String text = dataSnapshot.getValue(String.class);
                  String ho = email.getText().toString();
                  EmailRef.setValue(ho);
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
  </code></pre>