Java basic learning notes and identifier naming conventions

1. Comment question
“//”: single line comment
“/ /”: multi-line comment
“/ **… * /”: document comment

2. Identifiers
(1) Identifier naming convention
1. Identifiers must be letters, underscores _, or for open head 2 Mark knowledge symbol its he unit Minute can 线 Start with 2, other parts of the identifier can be letters, underscore _, Any combination with other numbers.
3. There is no limit to the length of Java's name, but it is sensitive to case.
4. Naming cannot be a keyword in Java.
⭐ (2) Specification of identifiers
1. Class name: the first letter of each word must be capitalized
2. It is best to follow the camel case rules for the tags of the methods and variables, that is, the first letter of the first word is lowercase, and the first letter of each subsequent word must be capitalized.
(3) Keyword: Slowly remember while typing the code. Insert picture description here
Insert picture description here
Summary
1. Whether you are studying or working, it is very important to have a good naming convention, which can help yourself and others to read the code better.
2. Have a good commenting habit to make your code more readable.
3. Learning languages ​​ca n’t be memorized by typing more code.
4. Take time to learn English! ! ! Thank you! ! !

Published 6 original articles · won 3 · views 199

Guess you like

Origin blog.csdn.net/weixin_43855187/article/details/104130201