Android Build a Simple Android App Basic Android Programming Accessing Views in Code: Declaring Variables

Declan Smith
Declan Smith
453 Points

What exactly is the use of 'm' in mFact and mButton?

New to coding and I'm not fully grasping the use of the 'm' of the use of 'private' when writing this script.

1 Answer

Fahad Mutair
Fahad Mutair
10,342 Points

hi Declan Smith , its android style of coding we use m prefix for member variable or member field

Follow Field Naming Conventions

Non-public, non-static field names start with m.

you can read more in this link