Java Code Specification

Java Code Specification:
Purpose: To increase the readability and maintainability of the program.
Note: 1. The method name starts with a verb.
     2. For jdk1.5 or above, the aggregation function must use the generic method.
     3. In the implementation class , The parameters of the method should be added with the final modifier.
     4. Pay attention to the line break, break after a comma, break before an operator, choose a higher-level break, and the new line should be at the same level as the previous line.
     5. When declaring one variable per line, it is good for comments. Try to declare variables at the beginning of the code block. 6.
     Each line contains at most one statement.
     7. Try not to bring a small return statement with a return value Brackets.
     8, each switch statement should include a default option.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327011691&siteId=291194637