A reference to an existing object in Java can be created simply by equating a variable to the object. To create a reference to an object in Java, follow these four steps.
After the object is created, the object data is displayed. The object data is displayed again with the reference your program has created. The data shown on the output when you run your program should be the same.