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.) |
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. |
If the property type is boolean, the get() method can be replaced or augmented by a method: public boolean is<PropertyName> ( ); |