A variable name that begins with an uppercase letter does not follow standard naming conventions, which decreases code readability. For example, Numberofguests. This applies to local variables, parameters, and non-constant fields.

Begin the variable name with a lowercase letter and use camel case: capitalize the first letter of each word within the variable name. For example, numberOfGuests.

  • J. Bloch, Effective Java (second edition), Item 56. Addison-Wesley, 2008.
  • Java Language Specification: 6.1. Declarations.
  • Java SE Documentation: 9 - Naming Conventions.