The goto
keyword is defined in the Java keyword list. But it's marked "not used."
In this case, it can also be interpreted as meaning that the feature may be added in a later version of Java.
If goto
is not defined as a keyword, you can create a variable name called goto
and use it as an identifier. However, if goto
is defined as a keyword in the next version of Java, all previously used names will be compilation errors due to the rule that identifiers cannot be defined with keywords.
Therefore, those that may be added later are defined as keywords in advance so that the above problem does not occur even if the Java version is updated.
© 2024 OneMinuteCode. All rights reserved.