According to the documentation the Android OS can kill the activity at the rear of the backstack.
So, say for example I have an app and open the Main Activity (let\
The answer is (3). If you need to keep values, persist them in shared preferences when each activity pauses and restore them when it resumes. Alternatively, you can also maintain an "initialized" static flag and re-initialize the static variables from any activity's onCreate() method if it is false.