Java programming 30 rules

xiaoxiao2021-03-06  43

Reprinted from ARK1111 Blog

(1) The name of the class name should be capitalized. The first letters of fields, methods, and objects (handles) should be lowercase. For all identifiers, all words contained should be close to, and the first letters of the intermediate word. For example: ThisiisaclassNameThisisMethodorfieldName If a constant initialization character occurs in the definition, all letters in the Static Final base type identifier. This will sign a constant they belong to the compile period. The Java package (Package) belongs to a special situation: they are all lowercase letters, even if the intermediate words are true. For domain name extensions, such as COM, ORG, NET or EDU, all should be lowercase (this is also one of Java 1.1 and Java 1.2). (2) When creating a class for routine purposes, please take "classic form" and include definitions for the following elements: