Reference

A reference value points to a sequence of memory locations that may contain an object or array.

Related concepts:  ValueTypeObjectArrayPrimitive

Closest Wikipedia entry:  Reference (computer science)

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Reference is based on principled authoritative sources such as:

Misconceptions about Reference
28 documented Misconceptions

Check Yourself
Misconception
AssignmentCopiesObject — Java
Assignment copies the object
Misconception
EqualityOperatorComparesObjectsValues — Java
o==p compares the objects referred to by variables o and p
Misconception
EqualsComparesReferences — Java
o.equals(p) compares the references stored in the variables o and p
Misconception
FinalReferenceImpliesImmutability — Java
An object referred to by a final variable is an immutable object
Misconception
MultiReferenceVariable — Java
A reference variable can point to multiple objects
Misconception
NullIsObject — Java
null is an object
Misconception
ReferenceIntoStack — Java
References can point into the stack
Misconception
ReferenceToBooleanCoercion — Java
Every reference type can be coerced to boolean
Misconception
ReferenceToIntegerConversion — Java
One can cast between references and ints
Misconception
ReferenceToVariable — Java
References can point to variables
Misconception
SubtypeCompatibleWithSupertype — Java
A variable of a subtype can reference an object of a supertype
Misconception
SupertypeIncompatibleWithSubtype — Java
A variable of a supertype cannot reference an object of a subtype
Misconception
ThisAsField — Java
this is a special field in the object
Misconception
ThisAssignable — Java
One can assign to this
Misconception
ThisCanBeNull — Java
this can be null
Misconception
ThisExistsInStaticMethod — Java
this is a local variable, also in static methods
Misconception
ThisInConstructorIsNull — Java
In a constructor, this is null
Misconception
VariablesHoldObjects — Java
A variable of a reference type contains a whole object
Misconception
AssignmentCopiesObject — JavaScript
Assignment copies the object
Misconception
ConstReferenceImpliesImmutability — JavaScript
An object referred to by a const variable is an immutable object
Misconception
EqualityOperatorComparesObjectsValues — JavaScript
The equality operator compares two objects' values
Misconception
NullIsObject — JavaScript
null is an object
Misconception
ObjectAsParameterIsCopied — JavaScript
Objects are passed by value
Misconception
ThisAssignable — JavaScript
One can assign to this
Misconception
AssignmentCopiesObject — Python
Assignment copies the object
Misconception
SelfAssignable — Python
Reassigning self changes the object on which a method is called
Misconception
VariablesHoldObjects — Python
A variable contains a whole object
Misconception
EqualityOperatorComparesListIdentities — Scratch
(list a) = (list b) compares the identities of list a and list b