Welcome to the Treehouse Community
Looking to learn something new?
Parker Busswood20,207 Points
Using 'm' for member variable prefix
In the Teacher Notes, Craig mentions that he's prefixing the variable name with the letter 'm' because it's a member variable, and this is in line with the Android code style guidelines (http://source.android.com/source/code-style.html#follow-field-naming-conventions).
Following that link, the Android guidelines suggest that non-public, non-static field names start with the letter 'm', but the example in the video was 'public String mCharacterName = "Yoda";' which isn't a non-public field name. Hunting for further explanation on StackOverflow, it also appears that many people suggest not using that notation as modern IDEs can display different items (eg. member variables) in different colors to help uniquely identify them. I might be misinterpreting the Android guidelines; any clarification would be much appreciated!
First off - the member was public only temporarily, as Craig mentioned. Meaning we'll change it to private later.
Now about the naming, it all comes down to personal preferences. I usually dislike the "m" prefix and do not use it(therefore I do not know about when it is proper to use it and when not, since I always omit it). If you choose that method, you'll have to learn about the "this" keyword. It's nothing special, don't worry. Modern IDEs (as you refer to them) will add it when they generate code for you (setters for example)
I don't think you should worry about this issue a lot. Just pick a method and stick to it.