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)
Misconceptions about Reference28 documented Misconceptions
Check YourselfAssignmentCopiesObject
Assignment copies the object
EqualityOperatorComparesObjectsValues
o==p compares the objects referred to by variables o and p
EqualsComparesReferences
o.equals(p) compares the references stored in the variables o and p
FinalReferenceImpliesImmutability
An object referred to by a final variable is an immutable object
MultiReferenceVariable
A reference variable can point to multiple objects
NullIsObject
null is an object
ReferenceIntoStack
References can point into the stack
ReferenceToBooleanCoercion
Every reference type can be coerced to boolean
ReferenceToIntegerConversion
One can cast between references and ints
ReferenceToVariable
References can point to variables
SubtypeCompatibleWithSupertype
A variable of a subtype can reference an object of a supertype
SupertypeIncompatibleWithSubtype
A variable of a supertype cannot reference an object of a subtype
ThisAsField
this is a special field in the object
ThisAssignable
One can assign to this
ThisCanBeNull
this can be null
ThisExistsInStaticMethod
this is a local variable, also in static methods
ThisInConstructorIsNull
In a constructor, this is null
VariablesHoldObjects
A variable of a reference type contains a whole object