I get the part about variables where they can contain a primitive value, or where they can reference an object on the heap, but I would like to know how variables are implemented -- what, exactly, is put on the stack when I declare and initiatie a variable? Is it like a vector segment of memory, storing the variable name, the type of the variable and then the actual value or reference? Is there any other information that gets stored?
I realize this might be too much to type an answer to, but I'd be grateful for links or book references that I can check out, too!