In C++ that statement makes a copy of the object’s state. In Java it simply copies the reference. The object’s state is not copied so implicitly calling the copy constructor makes no sense .
In C++ that statement makes a copy of the object’s state. In Java it simply copies the reference. The object’s state is not copied so implicitly calling the copy constructor makes no sense .