Meaningless Drivel is fun!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes valid identifiers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "valid identifiers" Watch "valid identifiers" New topic

valid identifiers

anandkrisnan variar

Joined: Feb 26, 2003
Posts: 16
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'

Regards,<br />anand.<br />IBM Global Services India.
Kasi lingam

Joined: Apr 01, 2003
Posts: 8
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

Joined: Oct 17, 2001
Posts: 4313

� 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.

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
I agree. Here's the link:
subject: valid identifiers
It's not a secret anymore!