identifier DefinitionRecognize Java identifiers in programming languages, identifiers are words that the programmer himself prescribes, such as class names, attribute names, variable names, and so on.
Q: Is the identifier God horse?
A: Identifiers are symbols that are used to name variables, classes, methods, and so on in a Java program.
There are several rules to follow when using identifiers:
1. Identifiers can consist of letters, numbers, underscores (_), dollar symbols ($) , but cannot contain other special characters, such as @,%, space, etc. , and cannot begin with a number . For example: 123name is not legal drop
2. Identifiers cannot be Java keywords and reserved words (Java reserved keywords, which may be used as keywords in later versions of the upgrade), but can contain keywords and reserved words. For example, void may not be used as an identifier, but myvoid can
3. Identifiers are strictly case-sensitive . So nirvana, be sure to distinguish between Chu Imooc and Imooc is two different identifiers Oh!
4. the name of the identifier should best reflect its role, to be known .
From Mu-class Web: Introduction to Java first season HTTP://WWW.IMOOC.COM/LEARN/85
Identifiers in the C language
Second, identifiers
Definition: Identifiers are some of the symbols and names that programmers customize in a program. Keywords (C language provides a special meaning of the symbols, a total of 32. is the system's own, and the identifiers are customized. such as the name of a function, to distinguish between various transactions.
Identifiers have certain naming conventions:
- Can only consist of 26 lowercase letters, 0-9 digits, and an underscore.
- Strictly case-sensitive.
- Cannot start with a number.
- You cannot use a keyword as an identifier.
It is recommended to follow the naming conventions:
(1) Try to make a meaningful name;
(2) Multiple words can be connected using the hump marker (the first letter of the second letter) or using an underscore.
From the blog Park: Top of the text-C language keywords, identifiers and annotations
Understanding Java Identifiers