Self Encapsulate Field

it2022-05-09  27

You are accessing a field directly, but the coupling to the field is becoming awkward.

Create getting and setting methods for the field and use only those to access the field.

转载于:https://www.cnblogs.com/nanshouyong326/archive/2007/05/14/746378.html


最新回复(0)