Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Variable Name Standard in Android

    • 0
    • 2
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 316
    Comment on it

    Variable Name Standard in Android

    This is the standard regime to follow in your coding when you define any variable.

    1.Non public, non static field should starts wih m.

    2.Static fields name should starts with s.
    3. Other fields should starts with a lower case letter.

    4.Constants field(public static final) are ALL_CAPS_WITH_UNDERSCORES

    For Examples:
    public class VariableStandardExample {
    public int publicExample;
    private static VariableStandardExample sVariableStandard;
    int mStatus;
    private int mPrivateExample;
    protected int mProtectedExample;
    public static final int MY_CONST = 53;
    
    
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: