(Thought Question:) Would it be possible to write a
PointDoubler class for ImmutablePoint objects?
Answer:
No — any such class could not gain access to the instance variables it needs to double.
End of Chapter
You have reached the end this chapter. It will be of great value to review the following. Click on a subject that interests you to go to where it was discussed.
- Call by Value
- Primitive Data Types
- The called method can't change the caller's data.
- Returning a value from a method.
- Object reference parameters.
- Changeable objects as parameters.
- How call by value works with object references.