If Integer i = 88, what is the memory address i resides at?
Additionally, if as part of Debugger, id number changes, is it indicative of the fact that a new object was created?

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.
The answer to your second question is yes, the “id” you see in Eclipse’s debugger uniquely identifies an object and so a change in it means a new object was created. So, for example:
Here i and k will have the same id, since they refer to the same object; j will be different.
The memory address of one of these objects is not really a useful piece of information, since objects move around in memory. All you can know is that if i == k, they are the same object. (So here, i == k but i != j).