The logic behind operator + is simply to return a brand new Point based on the summation of
the fields of the incoming Point parameters. Thus, when you write pt1 + pt2, under the hood you
can envision the following hidden call to the static operator + method:
Do'stlaringiz bilan baham: