title: deleting data in firebase console is not deleting data from the arraylist where I stored the object value
body: <p>I have an android project where I retrieve data from firebase. everything is working fine but when I delete object in firebase console, it does not reflect back in the app. </p>
  
  <p>Here is the link of the image: <a href="https://i.stack.imgur.com/nnyQJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nnyQJ.png" alt="Click here"></a></p>
  
  <p>So, suppose I delete david hafiz child node in firebase, it does not delete in the app. I have tried a lot but can't find the correct way. I am new to android programming and I hope somebody can help me. Thank You.</p>
  
  <p><strong>Update</strong></p>
  
  <pre><code> mDatabase = FirebaseDatabase.getInstance();
          mReference = mDatabase.getReference().child("Students").child("Marks");
  
          mReference.addChildEventListener(new ChildEventListener() {
              @Override
              public void onChildAdded(DataSnapshot dataSnapshot, String s) {
                  Log.d("value", "" + dataSnapshot);
                      fetchData(dataSnapshot);
  
  
              }
  
              @Override
              public void onChildChanged(DataSnapshot dataSnapshot, String s) {
                      fetchData(dataSnapshot);
              }
  
              @Override
              public void onChildRemoved(DataSnapshot dataSnapshot) {
              }
  
              @Override
              public void onChildMoved(DataSnapshot dataSnapshot, String s) {
  
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
          return view;
       }
  
  
  private void fetchData(DataSnapshot dataSnapshot) {
              StudentData value = dataSnapshot.getValue(StudentData.class);
              Log.v("StudentData Fragment", "" + dataSnapshot.getValue());
  
              // Get an iterator.
              Iterator&lt;StudentData&gt; ite = mMarksList.iterator();
  
              while (ite.hasNext()) {
                  StudentData iteValue = ite.next();
                  if (iteValue.equals(value))
                      ite.remove();
              }
              mMarksList.add(value);
              Collections.sort(mMarksList, new MarksComparator());
  
              String title = mReference.getKey();
  
              // specify an adapter
              mAdapter = new MyAdapter(getContext(), mMarksList, title);
              mAdapter.notifyDataSetChanged();
              mRecyclerView.setAdapter(mAdapter);
      }
  </code></pre>