I know what they are used for, but i’m confused how exactly setting m in field and s in static field create the getTextResId() and isAnswerTrue() methods instead of the other ones.
With the variable name: mTextResId
, if you do not set the m
and s
prefix preferences, your generated method would be: getMTextResId()
instead of getTextResId()
.
Other classes that will call this getter method don’t need to know that it’s backed by a member variable (which is what the m
means). Other classes just need to know that when they call this method, they are going to get a “Text Res ID” and it doesn’t matter where it comes from.
Does that clarify what’s going on?