This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes Instance and Reference variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Instance and Reference variables" Watch "Instance and Reference variables" New topic
Author

Instance and Reference variables

Vallabhaneni Suresh Kumar
Ranch Hand

Joined: Mar 01, 2004
Posts: 68
What is the difference between instance variable and reference variable?

Thank you
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24190
    
  34

They're overlapping things -- you can't divide all variables into one or the other category.

Instance variables are non-static members variables of a class. Reference variables are non-primitive variables -- i.e., all variables of class or interface type.


[Jess in Action][AskingGoodQuestions]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Instance and Reference variables
 
It's not a secret anymore!