• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

valid identifiers

 
anandkrisnan variar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which are valid identifiers?
1) _variables
2) �currency
3) val$ue
4) @purr
5) 2digits
Also can u tell what is the '�' in the '�currency'
 
Kasi lingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1,2,3 are valid identifiers.
4,5 are not valid identifiers.It starts with number and invalid character.
� is the currency for Japan 'YEN'.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
� is the currency for Japan 'YEN'.
Exactly right. Identifiers can start with a letter, underscore or a currency symbol, and they can include digits in any location EXCEPT the first one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic