1 | Giving a set method defines a write property, and a get method defines a read property, according to this pattern: public void set<PropertyName>(<PropertyType> value); public <PropertyType> get<PropertyName> ( ); (where the first letter of PropertyName is decapitalized.) |
2 | Although the typical actions of the get and set methods are to get the value of and assign to one or more variables representing the property, they may have additional actions. |
3 | If the property type is boolean, the get() method can be replaced or augmented by a method: public boolean is<PropertyName> ( ); |