Java naming conventions
java is a case sensitive language, that means there is a seperate recognization for uppercase letters and lower case letters.
Exampleabcis not equal to ABC(ABC != abc).
java has the following naming conventions, they are
all classes, abstract classes, and interfaces Names must be started with uppercase letters and their subsequent symbols must be uppercase letters.
Example:
String
StringBuffer
all variables must be started with lowercase letters and subsequent symbols must be uppercase letters.
Example:
nameIsZaheer
all methods must be started with lowercase letters and subsequent symbols must be uppercase letters.
Example:
additionWithTwoParameters()
additionWithThreeParameters()
all constant variables must be in uppercase letters only.
Example:
GLOBAL_VARIABLE
All the package names must be in lowercase letters.
Example:
com.zaheerintrovert.javanamingconventions
No comments:
Post a Comment