Bummer! You have been redirected as the page you requested could not be found.

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 trial

Java

what does the "m" before a variable do? like what is the difference between Game and mGame?

very simple very simple please

4 Answers

Hello Emily.

In fact that "m" at the beginning does absolutely nothing. Its there to make it easy for you and other developers to guess that this is a member variable.

what is a member variable? in simple terms again, please

Shortly a member variable is a variable that belongs to a class.

what is a class? and what does it mean to be a part of one?

I think you need to go through the Java courses as you miss some of the knowledge needed to understand most of the things you are asking about. Go through the courses and I guarantee you will understand those things .

Starting with letter 'm' for the member variable(variable which is part of a user defined function) is a best practice to differentiate between Member Variables and general variable(which are usually written under main function). Many Thanks!!