First, we should be familiar with some terms used for assignment.
Expression: There are lots of different kind of expressions. The most common one is the arithmetic expression such as 3+2 and it can be evaluated to produce the value 5. We also use expressions to create a new object by instantiating a class."new Elephant()" is an expression.
Value of the expression: It is the reference to an object.
Notice: A variable can also be an expression and its value is the reference assigned to it.
After we declared a variable, we usually assign a value to the variable which means the variable got a reference to an expression. It can be illustrated using a picture: |