A getter is a public accessor method, used in object-oriented programming, which returns the value associated with a private member of a class.
A getter is public method, used in object-oriented programming, which returns the value associated with a private member of a class. A getter often refers to the get portion of a property. The getter method may perform other tasks such as validation, but is usually considered non-mutating.