What is the difference between
int id= android.os.Process.myPid();
android.os.Process.killProcess(id);
and
System.exit(1);
I know that both kill the process. but, I have felt the difference that on killing a process, when it is restarted, it is started from a previous state. But, I want to know the technical details behind such error.