title: What happened to activity when back is pressed
body: <p>Very simple for experts but i dont know how to search it. So my question is</p>
  
  <p><strong>Which method will create when back arrow is pressed(not menu/soft back button)  go to home/parent activity??</strong><a href="https://i.stack.imgur.com/ntYEp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ntYEp.png" alt=""></a>
  i am talking about green circle button not red circle button</p>
  
  <p>Is it <code>onStop()</code>,<code>onPause()</code> or <code>onRestart()</code>??</p>
  
  <p>I am confused with all, though i have read the method but i cannot link it with my project.</p>
  
  <p>Basically user on A activity perform some task and when user go back to parent activity then again perform some other task and when again come to A activity then some task also have to perform?</p>
  
  <p>So which method suits?</p>