author and iconoclast
posted 11 years ago
The int is either held in a local variable -- i.e., a slot in the stack frame of the method -- or as part of a heap object, if it's a member. The Integer is an object, allocated on the Java heap. The reference to the Integer (the second variable "i") is held in one of the same two places, depending.