Java development specifications chapter of the basics - naming convention

Mentioned naming convention, everyone will think is "hump" principle. So here a simple list of commonly used naming convention:

1 , the full class name and meaning of the English class interface description, the first letter of each word in the English uppercase, lowercase remaining letters of case law hump.

 

 

 2 , the full significance of the method name using the English class description: The first word in lowercase letters, uppercase first letter of the word surplus remaining letters lowercase hump case law.

 

 

3 , the method, the method of using access attribute setter and getter methods, a method using the action verbs and verb-object structure.

 

 

 4 , attribute names use the full meaning of the English description: The first word in lowercase letters, uppercase first letter of the word surplus remaining letters lowercase the case of mixing. Attribute names can not be the same as the method name.

 

 

5 , constant name in English describing all-caps, between the English words separated by underscores, and use final static modification.

 

 

  

Guess you like

Origin www.cnblogs.com/cokeHuan/p/11897379.html