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) — In computer programming, a reference is a value that enables a program to indirectly access a particular datum, such as a variable's value or a record, in the computer's memory or in some other storage device. The reference is said to refer to the datum, and accessing the datum is called dereferencing the reference. A reference is distinct from the datum itself.
Misconceptions about Reference29 documented Misconceptions
Check YourselfAssignmentCopiesObject — Java
Assignment copies the objectAssignmentCopiesObject — JavaScript
Assignment copies the objectAssignmentCopiesObject — Python
Assignment copies the objectBoxedNull — Java
Passing null to a wrapper class constructor creates an object representing the absence of a valueConstReferenceImpliesImmutability — JavaScript
An object referred to by a const variable is an immutable objectEqualityOperatorComparesListIdentities — Scratch
(list a) = (list b) compares the identities of list a and list bEqualityOperatorComparesObjectsValues — Java
o==p compares the objects referred to by variables o and pEqualityOperatorComparesObjectsValues — JavaScript
The equality operator compares two objects' valuesEqualsComparesReferences — Java
o.equals(p) compares the references stored in the variables o and pFinalReferenceImpliesImmutability — Java
An object referred to by a final variable is an immutable objectMultiReferenceVariable — Java
A reference variable can point to multiple objectsNullIsObject — Java
null is an objectNullIsObject — JavaScript
null is an objectObjectAsParameterIsCopied — JavaScript
Objects are passed by valueReferenceIntoStack — Java
References can point into the stackReferenceLabeledWithDynamicType — Java
In stack and heap diagrams, reference variables are labeled with the types of the objects they refer toReferenceToBooleanCoercion — Java
Every reference type can be coerced to booleanReferenceToIntegerConversion — Java
One can cast between references and intsReferenceToVariable — Java
References can point to variablesSubtypeCompatibleWithSupertype — Java
A variable of a subtype can reference an object of a supertypeSupertypeIncompatibleWithSubtype — Java
A variable of a supertype cannot reference an object of a subtypeThisAsField — Java
this is a special field in the objectThisAssignable — Java
One can assign to thisThisAssignable — JavaScript
One can assign to thisThisCanBeNull — Java
this can be nullThisExistsInStaticMethod — Java
this is a local variable, also in static methodsThisInConstructorIsNull — Java
In a constructor, this is nullVariablesHoldObjects — Java
A variable of a reference type contains a whole objectVariablesHoldObjects — Python
A variable contains a whole object