CamelCase Notation- Naming Convention for Programming Languages
CamelCase is the practice of writing compound words or phrases in which the words are joined without spaces and are capitalized within the compound like BreakFast, myName etc. CamelCase is so named because each word in the identifier is put together without spaces, but with the first letter of each word captilised, looking like humps of a camel. There are two varieties in CamelCase- UpperCamelCase and lowerCamelCase. In java variables, references, method names are declared in lowerCamelCase.
int animalCount;//Variable declared using lowerCamelCase
public abstract int getAnimalCount();//Method defined using UpperCamelCase
UpperCamleCase is also called as Pascal Notation. The only difference between the LowerCamelCase and UpperCamelCase (Pascal Notation) is that the first letter of the compound word is capitalised in case of UpperCamelCase while it is not in case of lowerCamelCase. In Java class names are declared in UpperCamelCase notation.
class AnimalTest //Observe the UpperCamelCase notation used for declaring the class name
{
String name;
public AnimalTest(String name)
{
this.name=name;
}
}
Read more on Java Programming Style Guide here.
For more information on the CamelCase notation here.
