Home : Software Terms : CamelCase Definition

CamelCase

camelCase is a naming convention in which each word within a compound word is capitalized except for the first word. Software developers often use camelCase when writing source code.

camelCase is useful in programming since element names cannot contain spaces. The camelCase naming convention makes compound names more readable. For example, myOneMethod is easier to read than myonemethod.

Other examples of camelCase are listed below:

  • newString;
  • getNewString()
  • myVariableName;

The name camelCase (also "camel case" or "dromedary case") comes from the hump on a camel, which is represented by the capital letter in the middle of the compound word. A camelCase word may have one or more capital letters.

camelCase vs PascalCase

camelCase is similar to PascalCase, which capitalizes the first letters of all words in a compound word, including the first word. For example, myFunction() in PascalCase would be MyFunction(). Programmers may choose to use either font case when writing source code, since it does not affect the syntax. While each developer can choose his or her preferred style, some programming languages have standard naming conventions. For example, in Java, the following cases are recommended:

  • Classes: PascalCase — class VectorImage {}
  • Methods: camelCase — drawImage()
  • Variables: camelCase — string newImageName

NOTE: PascalCase is sometimes called "UpperCamelCase," while standard camelCase may be specified as "lowerCamelCase." In recent years, developers have moved away from these terms and use PascalCase and camelCase instead.

Updated: October 7, 2019

Cite this definition:

https://techterms.com/definition/camelcase

TechTerms - The Tech Terms Computer Dictionary

This page contains a technical definition of CamelCase. It explains in computing terminology what CamelCase means and is one of many software terms in the TechTerms dictionary.

All definitions on the TechTerms website are written to be technically accurate but also easy to understand. If you find this CamelCase definition to be helpful, you can reference it using the citation links above. If you think a term should be updated or added to the TechTerms dictionary, please email TechTerms!