I found answer on stackoverflow:
From documentation, it is pretty clear:
public abstract FragmentTransaction addToBackStack (String name)
Add this transaction to the back stack. This means that the transaction will be remembered after it is committed, and will reverse its operation when later popped off the stack.
Parameters:
name: An optional name for this back stack state, or null.
So your parameter is optional a represents the name of the fragment.
If you just want to add this transaction to the back stack and don't need to access it later then you can put `null` as the name.
In this context, `null` in plain English means "I don't need a name for this fragment". That is why it says the name is optional. If you do put a name you can use that name later. If you put a null that just means add this fragment to the back stack and I don't need it anymore.
The use of the name is to identify that specific fragment. This can be useful for example if you want to obtain that fragment from the `FragmentManager`:
addToBackStack (FRAGMENT_NAME);
getFragmentMangager().findFragmentByTag(FRAGMENT_NAME);