> For the complete documentation index, see [llms.txt](https://gyansetu-java.gitbook.io/core-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gyansetu-java.gitbook.io/core-java/7-variables/object-reference-variables.md).

# Object Reference Variables

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvF1x3RkRBN6XmnWMV%2Fimage.png?alt=media\&token=6bb0d552-eee7-4500-9fbe-1caf3a1be259)

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvFD1S1uaeHp08Nyt4%2Fimage.png?alt=media\&token=d0d654de-4e2f-4c90-8746-4473aa913cb1)

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvFGDqq5C9RwaQq9pF%2Fimage.png?alt=media\&token=0985edd3-19aa-4511-bcab-90d6d8901a51)

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvFR9FYJx7fTWLhWXr%2Fimage.png?alt=media\&token=10c55b01-1083-4029-afd7-4b75e0ead542)

### Real Life Example:

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvF_uelX-LdVFDxrX0%2Fimage.png?alt=media\&token=35496d34-cc99-4c83-a9db-0cc38f0daa74)

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvFe4TIqft6KmkgvyE%2Fimage.png?alt=media\&token=7338100b-dd92-494c-a98a-7646b154239c)

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvFi2gdi2SxGZHqXla%2Fimage.png?alt=media\&token=41f18c49-20ec-4782-9dc8-c232a234033f)

### Difference between Primitive variable and Object reference variable:

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LTv2ytnWXfGlMHx5z47%2F-LTvG5GBB4FGCTGPbaKk%2Fimage.png?alt=media\&token=52bc3bb0-fefe-436b-b6ed-aeb69fa8830e)

<br>
