Local variables gets placed in stack when method is called and when JVM halts without completing the method, will the local variable still remain on the stack?
Example:
void Method() {
int a=2;
System.exit(0);
Foo f=new Foo();
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. After the
System.exit(0)the system will clean-up the mess.