I've read there are a lot of ways to close an application, so I would like to know if this way is correct or there are defects
main_activity.java
public boolean onOptionsItemSelected(MenuItem item) {
.....
.....
else if (id == R.id.exit) {
onDestroy();
}
}
@Override
protected void onDestroy() {
System.exit(0);
super.onDestroy();
finish();
}
Is this conceptually correct?