Java Advance

Assignment of Object referance variables

views

09:40
By this you have both the objects c1 and c2 of class Cube1 holding the reference to the sameobject. NOT that c1 and c2 are distinct objects and hold different references. Remember that whenever you are assigning one object variable to another you are notcreating a copy of the object but you are creating a copy of reference to the object.