If there is a Class A.
1. For example, the following expression:
A a1 = new A ();
So a is a class, A1 is a reference. New A () is an object. Just A1 this reference points to the object of New A ().
2, also such as:
A A2;
A represents a class, A2 is simply a reference, and only the object that the A2 points to is null null.
3, again such as:
a2 = A1;
It represents the A2 is a reference, A1 is also a reference, in this process A1 the address of the object to the A2, making A2. A1 points to the same object.
4. References
As in the following code snippet:
int k; Base data type
A; Reference data type
A = new A ();//Class A as a template in the heap of space to create a Class A object, also known as the initialization of the object
b b1,b2,,,, bn;//assumes that B is an abstract class or interface
Java Learning note--java object creation, initialization, reference parsing