I am struggling with bug in my program. and finally i got the point. here integer shows value 1 at the time of declaration. I clean and build again. but it shows 1 value?
please any one explain me why this happen?

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.
When you declare a local variable without specifying a value, you need to assign it first before reading from it becomes valid. The
1that you see in your integer variable could be any garbage value, it is unspecified. Reading this value is undefined behavior.This is different from instance variables, which are initialized by default.