Not able to close the application in android
<p>I am new to android and java.I have created 9 activities(screens) and each one has a next button to navigate to next screen and 9th screen has an exit button to close the application.but if i call finish() or android.os.process.killProcess api's it is going to the previous screen but its not closing the whole application.</p>

<p>Could you please provide me the code snippet to close the whole application.</p>
