Home >Java >javaTutorial >What are the reserved words in java
The so-called reserved words, that is, they have no special meaning in the current version of Java. Later versions may be used as words with special meaning, or although the word has no special meaning in Java and is not intended to be used in future versions, it will be used in future versions. They have special meanings in other languages and should not be defined as variable names in Java because they are easy to confuse.
Java is derived from C. const and goto are keywords in C, but they are not used in Java yet, but they may be used in the future. to, so it is set as a reserved word.
Java keywords (Key Word): have special meaning to the Java compiler. They are used to represent a data type or the structure of a program.
Keywords will be compiled and changed in color in development tools such as eclipse
Note: There is no need to memorize them by rote. If you use keywords as identifiers, the compiler can prompt an error.
Java reserved words
const Youdao interpretation: n. constant, constant
Use For modifying the declaration of fields or local variables. It specifies that the value of the field or local variable is a constant and cannot be modified
goto Youdao interpretation: vi. Go to
to specify the jump to the label, after finding the label , the program will process commands starting from the next line.
Keywords must be reserved words.
Reserved words are generally equivalent to keywords.
Reserved words include keywords and unused reserved words
Keywords refer to those words that have specific meanings in the language and become part of the grammar. In some languages, some reserved words may not be used in the current grammar.
The above is the detailed content of What are the reserved words in java. For more information, please follow other related articles on the PHP Chinese website!