my activity is restarting though i call finish when starting another on button click,
<pre><code>public void quitclick(View b)
{
    startActivity(new Intent(getApplicationContext(),Quit.class));

    overridePendingTransition(0,0);
    System.gc();
    finish();
    this.finish();
}
</code></pre>

<p>i am new to this trying a little game,these lines are from current activity(wingame) it also has quit button when i click on the quit button next activity with yes and no ,shows up and when click on yes starts wingame activity once instead of closing the app.</p>
