Multiple choice technology programming languages

Which of the following is not a legal identifier?

  1. a2z

  2. 52pickup

  3. _class

  4. total#

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, identifiers cannot begin with a digit, making 52pickup illegal. Additionally, identifiers cannot contain special characters like #, which makes total# also illegal. The question is slightly flawed as it has two illegal identifiers, but 52pickup is definitely not legal.