Which of the following is not a valid identifier in java
1 point
_age
$$amount
8thClass
nullValue
Answers
Answered by
29
8thClass is not a valid identifier as identifier name must not start with a digit.
I hope you understood.
Answered by
0
Answer:
8thClass
Explanation:
- We know that numerical figures are not considered valid identifiers in java.
- The valid identifiers must letter, underscore, or currency symbols.
In the given question,
- "_age" starts with an underscore which makes it a valid identifier.
- "$$amount" starts with the symbol of a currency, hence it is a valid identifier.
- "nullValue" begins with a letter which means that it is a valid identifier as well.
- "8thClass" starts with a numerical value, hence it is not a valid identifier.
Hence, "8thClass" is not a valid identifier in java.
#SPJ2
Similar questions