why Google calls variables with the prefix "m"?

why Google calls variables with the prefix “m” for example:

    private int mSectionResourceId;
    private int mTextResourceId;

I see it in all examples. But i not understand why they do it?

And now i have some example where it practic very good. If a called variabels without prefix i need write

public SimpleSectionedRecyclerViewAdapter(Context context, int sectionResourceId, int textResourceId,
                                              RecyclerView.Adapter baseAdapter) {
        this.sectionResourceId = sectionResourceId;
        this.textResourceId = textResourceId;

but if i use prefix i can write

public SimpleSectionedRecyclerViewAdapter(Context context, int sectionResourceId, int textResourceId,
                                              RecyclerView.Adapter baseAdapter) {

        mSectionResourceId = sectionResourceId;
        mTextResourceId = textResourceId;

I think it more readable. Who can explain to me the pros and cons of a prefix?


Source: android

Leave a Reply