Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Instance and Reference variables

 
Vallabhaneni Suresh Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between instance variable and reference variable?

Thank you
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic