Getter and Setter Methods Review
You’ve been using methods such as
setText
and setImageResource
. These are called setter methods because they are meant to modify or manipulate one value of a view (such as the text or image that it stores). Conventionally they start with the word "set".
There’s also a category of methods called getter methods, whose sole purpose is to "get" one value of a view, such as getting the current text of a view. Conventionally they start with the word "get". We’ll be using some getter methods in this next exercise.
Hiç yorum yok:
Yorum Gönder