Java basic grammar-identifier naming convention

Constituent elements

  1. Alphabet: a-zA-Z

  2. Numbers: 0-9

  3. Symbol: underscore _, dollar sign $ (bold)

Identifier rules

  1. Number cannot start
  2. Keywords cannot be used
  3. Strictly case-sensitive, when naming names are not limited in length, try to be as clear as possible

note:

  1. The name of the class: Capitalize the first letter of each word, capitalize the first letter of each word;
  2. The name of the method: the first letter is lowercase, and the first letter of each word is uppercase; (camel case nomenclature)

Guess you like

Origin blog.csdn.net/xiaonuanhu/article/details/108574402