When you declare a variable, it is always a good idea to initialize it. With value types, it is common to see code such as this:
int i = 0; double d = 0.0;
Remember that to initialize a reference variable such as a class, you can create a new instance of the class and assign the reference variable to the new object, like this:
Circle c = new Circle(42);
This is all very well, but what if you don't actually want to create a new object—perhaps the purpose of the variable is simply to store a reference to an existing object. In the following code example, the Circle variable copy is initialized, but later it is assigned a reference to another instance of the Circle class:
Circle c = new Circle(42); Circle copy ...