tags:

views:

201

answers:

2

I have been looking over some of the android source, and the examples given in the Dev guide, and I notice that many of their classes begin with the letter m, as in the example below:

    // Create an anonymous implementation of OnClickListener
private OnClickListener mCorkyListener = new OnClickListener() {
    public void onClick(View v) {
      // do something when the button is clicked
    }
};

From this page: http://developer.android.com/guide/topics/ui/ui-events.html

What does the m signify?

+4  A: 

The prefix 'm' is a naming convention used to denote private member variables and methods.

Various communities no longer use this convention, but apparently the person(s) who created the android documentation still follow that convention.

Forgotten Semicolon
+3  A: 

Well, the class doesn't begin with an "m", the variable name does. It's just a convention used to indicate that this is a member variable

Eric Petroelje
Ah yes, that is correct.
Jason Martens