I'm trying to edit the name of the classroom shown in the image below without losing the children data, how to do that in android ?

I'm trying to edit the name of the classroom shown in the image below without losing the children data, how to do that in android ?

There is no way for doing this. There is no API that allows you to change the name of a node in a Firebase database. What can you do instead, is to create another node with the desired name, containing the same childrens and then remove the old one.