Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Getters [1/12]


Getters and Statement Lists

A getter is a member that produces a value.

Type num has a getter .int. It produces a value equal to the whole part of the given number. In other words, it returns the whole part of the number.

Type color has members .r, .g and .b. These three members are getters and setters, meaning that they can also be assigned a value.

Loading...