What is Java Identifier

  • Identifiers are the name given to the Class/interface, variable and method to identify them uniquely.

Rule of Identifier

  1. The identifier name contains alphanumeric values eg. userName.

  2. Identifiers name should not start with a numeric value eg. 1userName.

  3. $, @, _ are the only special characters that can be used with the identifier.

  4. An identifier can start with allowed special characters.

  5. No spaces are allowed in between identifier

  6. keyword can't used for identifier