What are valid identifiers in Java?
Answers
Answered by
3
Answer:
Explanation:
A: In Java, all identifiers must begin with a letter, an underscore, or a Unicode currency character. Any other symbol, such as a number, is not valid. Furthermore, an identifier cannot have the same spelling as one of Java's reserved words. (For a list of keywords and literals reserved from use as identifiers, see "3.9 Keywords" from the The Java Language Specification.)
In Java an identifier is anything used for the name of a declared entity. So an identifier includes all package, class, method, parameter, and variable names. So in the case of 7ofHearts, you are simply out of luck.
aman95858:
Hiii
Similar questions