References are Values
Suppose you have declared r to be an Account variable, i.e., you have the declaration
Then you can assign any reference to an Account object into variable r.
Example:
/* If k is 1, deposit d into account1, otherwise deposit d into account2. */
if ( k == 1 ) a = account1;
else a = account2;
// Deposit d to Account a.
a.balance = a.balance + d;
a.deposits = a.deposits + d;
Two or more variables that refer to the same object are called aliases.