answersLogoWhite

0


Best Answer

An object is the actual storage space in memory in which some collection of data resides.

A reference variable is a variable which refers to the memory location of an object.

Look at the pseudocode below:

Object obj = new Object();

Here obj is the reference variable, and the data to which it refers is the object.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

6y ago

Strictly speaking, a reference is not a variable of any kind, thus there is no such thing as a "reference variable". A variable is a memory address in which we can store a single value whereas a reference is simply an alternate name for an existing variable.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

A variable's reference is a reference to where the value of the variable is being stored in memory. A variable's value is the true assignment value of the variable.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

http://www.coderanch.com/t/399872/java/java/Difference-instance-variable-reference-variable

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between reference variable and instance variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between the structure tag and structure variable?

The structure tag is a type. The structure variable is an instance of that type.


What is the difference between value type parameters and reference type parameters?

When a variable is passed by value, the function receives a copy of the variable. When a variable is passed by reference, the function receives a reference, or pointer, to the original data.


What is difference between an instance variable and a class variable?

An instance variable is typically associated with an object instance of the class whereas class variable is not associated with any object instance. Static variables are referred to as class variables while non-static regular variables are called instance variables. Simply put, you will have as many instances of the instance variable as there are object instances. i.e., if there are 10 instances of an object, you will have 10 instances of that instance variable as well. But, there will be only one instance of the static or class variable. Instance variables are accessed as follows: objname.variableName; Class variables are accessed as follows: ClassName.variableName;


What is the difference between instantiation and initialization in C plus plus?

Instantiation is creating the instance of the variable/object . While Initialization is to provide the variable with some value. int i; // i is an instance of an integer i=10; //initialised with the value 10


What are the difference between versions and functions?

Version: static reference to a specific entity of a specific instance. Function: dynamic reference to existing algorithm to perform or execute.


The difference between fixed and variable inputs?

difference between fixed and variable inputs


What is the difference between independent variable and a constant variable?

A constant is something that will ALWAYS remain the same in your experiment. For instance, the materials you use and the unit of measurements you use are examples of constants. An independent variable changes with the experiments.


Difference between variable resistor and rheostat?

The difference between a variable resistor and a rheostat is the same as the difference between six and half a dozen.


What the difference between a variable and control?

The difference between a controlled variable and a variable is in their state. A controlled variable is something which is rigid and constant while a variable is liable to change and inconsistent.


WAP to show the difference between a variable and static variable?

difference between constant and static variables in java


What is the difference between a variable being tested and a variable being controlled?

The difference between these both is that the control is what stays the same in an experiment and the variable is what changes.


What is one difference between a variable and a numerical expression?

The variable.