More about Objects and Classes
Exactly the same as the first version of it:
You can not be sure about the internal workings of a program by inspecting its output!
|Program:||What it did:|
|object, method changes state The first program||An object was constructed. The variable pt refers it.|
Then, new data replaced the old data inside the same object.
|object, assignment replaces old The second program||An object was constructed. The variable pt refers it.|
Then, a new object was constructed with new data, and pt was changed
to refer to the new object. The first object became garbage.
When are two points equivalent?