Question: ```
#include<stdio.h>
main()
{
  printf("%c\n",1-3+2["nexus"]);
}

```

The result is **v**. How does it turn out?  

What does the indentation (square ones) do?

Answer: 
use addOnBackStackChangedListener method in your BaseActivity, which will be called any time backstack changes

```
getSupportFragmentManager().addOnBackStackChangedListener(
            new FragmentManager.OnBackStackChangedListener() {
                public void onBackStackChanged() {
                    FragmentManager fm = getSupportFragmentManager();

                    if (fm != null) {
                        int backStackCount = fm.getBackStackEntryCount();
                        if (backStackCount == 0) {
                            if (getSupportActionBar() != null) {
                                getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu);
                            }
                            setToolbarTittle(R.string.app_name);
                        } else {
                            if (getSupportActionBar() != null) {
                                getSupportActionBar().setHomeAsUpIndicator(R.drawable.back);
                            }
                        }
                    }
                }
            });

```
You can find a nice `Fragment` lifecycle diagram in the android docs [here](http://developer.android.com/guide/components/fragments.html). So yes, if the fragment is brought to the foreground from the backstack `onCreateView()`, `onActivityCreated()`, `onStart()` and `onResume()` are called.