Computer Science, asked by priyaumesh854, 6 months ago

Which of the following is not a valid identifier in java

1 point

_age

$$amount

8thClass

nullValue

Answers

Answered by anindyaadhikari13
29

8thClass is not a valid identifier as identifier name must not start with a digit.

I hope you understood.

Answered by syed2020ashaels
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,

  1. "_age" starts with an underscore which makes it a valid identifier.
  2. "$$amount" starts with the symbol of a currency, hence it is a valid identifier.
  3. "nullValue" begins with a letter which means that it is a valid identifier as well.
  4. "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