title: How to close previous activity in android
body: <p>I have an android application to show  the students details such as name, age , attendence like details...suppose if I use </p>
  
  <pre><code>for(int i=0;i&lt;3;i++)
  {
  Intent student = new Intent(Admin.this,student.class);          
  startActivity(student);
  }
  </code></pre>
  
  <p>now the student activity creates the activity three new times.What i need is, i want to close 
    previous student activity before the next new activity begins in the for loop. i can not able to use "finish()" because i called it from "Admin" class</p>