Computer Science, asked by ParteekTushir4794, 1 year ago

What are valid identifiers in Java?

Answers

Answered by sandharjashan
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