You do realise that Point object is a classic example of poor design because it has public non‑final fields?
The last bit is called a copy constructor. It creates a new object of the same class identical to the original. So if you can write
In the case of the Point class you can implement it like this
As for originOne, you are getting confused. No, that does not set originOne to the other Point; originOne already points to a Point object at 23, 94. What it does is set the corresponding reference in the Rectangle object to point to that Point too.
Another bit of bad design; if you change the state of the Point object, the Rectangle object will move to follow it.
I challenge you to alter their
Rectangle class to get rid of that problem.