which method is called in current activity when moving to another activity?
<p>which <code>method</code> is called in <code>current activity</code> when moving to another <code>activity</code>? Let's take i am in <code>Activity A</code>, from A i move to <code>Activity B</code>. </p>

<p>I want to execute a particular <code>piece of code</code> while moving to <code>Activity B</code></p>
