Multiple choice technology programming languages

Choose the illegal identifier?

  1. int _a;

  2. int $b;
  3. int _123;

  4. int e#123;

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

Java identifiers must conform to strict rules: they can contain letters, numbers, underscores, and currency symbols like the dollar sign. Special characters such as # are strictly prohibited, which makes the identifier e#123 illegal and invalid.