Rules for naming variables

  1. Variable name should be Unique within scope
  2. Variable name should be <= 255 characters (based on the programming language)
  3. Variable name should not contain spaces or any special characters (. , “ - $ # * and others). The underscore _ is a valid character
  4. Variable name cannot be a reserved word
  5. Should use upper and lower case with purpose
  6. It is always good programming practice to use names that are descriptive or mnemonic
  7. The first character of the variable name must either be alphabet or underscore
  8. It should not start with the digit

Integer i = 0;
String EmployeeName = 'Arul';

No comments:

Post a Comment