Languages
[Edit]
EN

Programming - camelCase definition with example

6 points
Created by:
TheDalot
390

In this article, we would like to explain the concept of the camelCase naming style.

Example name:

camelCaseNameExample

The main idea is to:

  1. always start the name with a small letter,
  2. mark worlds join using capital letters.
  3. the abbreviation:
    • should be converted to small letters when starts the name,
    • when is located inside the name:
      • must be started with a capital letter,
      • can be written with all capital letters,
      • can be capitalized to make the name more readable.

Hint: using single or multiple abbreviations inside the name, select rules to make, as possible, names maximally readable.

Other examples:

Input (regular text)     Output (in cameCase)
--------------------     --------------------

This is example text     thisIsExampleText

HTML content             htmlContent

main HTML content        mainHTMLContent  or  mainHtmlContent

e-book                   eBook

new HTTP APR library     newHttpAprLibrary    <---- to increase readability

See also

  1. Programming - Case Styles

References

  1. camelCase - Wikipedia

Alternative titles

  1. Programming - camel case definition with example
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Programming - Case Styles

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join