[Java] FIG memory object as parameters and return values

Object as a parameter

When the method using an object passed as a parameter to the fact that an object passing in the address value
Here Insert Picture Description

The object as a return value

Here Insert Picture Description

A method of using the same two objects

Here Insert Picture Description

When two references point to the same object

Here Insert Picture Description

Memory map of an object

Here Insert Picture Description

Published 218 original articles · won praise 6 · views 20000 +

Guess you like

Origin blog.csdn.net/u011035397/article/details/104944865