While reference-type variables refer to a place in memory, value-type variables hold the actual data.
Let’s put that into practice with a little code.
bookLocation that refers to a new
The variable is a reference to the object’s location in memory.
Book variable named
sameBookLocation and set it equal to
Both variables refer to the same location in memory.
falseValue that refers to the boolean value
The variable holds the actual value.
anotherFalseValue and set it equal to
false value was copied to a new location in memory for
anotherFalseValue to use.