Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJeff Walker
2,454 PointsCorrect me if I am wrong but I do not believe the naming convention of mVariable is used in Java. Other languages yes.
I have been coding in Java for many years and the mVariable type of naming convention has never been an accepted standard anywhere I have worked. You see this in other languages but not Java. The standard has always been myVariable with no indication of variable type ( local, member, etc ). Has something changed?
3 Answers
miguelcastro2
Courses Plus Student 6,573 PointsJeff,
This convention is more common and recommended for Android development, but I have not seen it in standard Java development. Android Studio understands the convention and it can be useful to use. Ultimately, it's all preference.
Kyle Salisbury
Full Stack JavaScript Techdegree Student 16,363 PointsThe Java instructor Craig in the Java Tracks uses it, but he admits that he is not a true Java developer. He does mainly Python I think.
Gavin Ralston
28,770 PointsThe Android Code Style Guide might help you make more sense of the convention. It goes beyond just "m is for member" and makes more sense out of it. singletons and constants being instantly recognizable, and you don't have to fill your source with this in order to be very clear about the variable's membership.
Jeff Walker
2,454 PointsJeff Walker
2,454 PointsCool. Thank you very much for the info.