Is primitive assigned a memory address?
问题 I am trying to understand the process of declaration and assignment of a primitive type at the back stage. int i; i = 3; For 1), on the memory stack, it assigns a space for storing an int type value named i For 2), it assigns the value 3 to the space preserved above Is there a memory address there? From my impression, memory address is always associated with the objects on the heap? Update: Regarding the replies: So, for every variable on the stack, they are all assigned a memory address as