Getters and setters

Getters and setters are special methods that provide read and write access to an object’s properties.

You can create additional properties by implementing getters and setters, using the get and set keywords.

With getters and setters, you can start with instance variables, later wrapping them with methods, all without changing client code.

Related concepts

Getters and setters

Getters and setters — Structure map

Clickable & Draggable!

Getters and setters — Related pages: