Objects & References
When Java encounters the keyword “new”, it allocates space in memory for an instance of that object. Now, shoeBox refers to an instance of class Box, i.e., an object.
Note that the instance (or object) “gets” everything defined in class Box. It has unique copies of all the variables. (Method are shared at byte code level.)