This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes want to know Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "want to know" Watch "want to know" New topic
Author

want to know

Ravinder Partap
Greenhorn

Joined: Feb 03, 2008
Posts: 8
I want to ask Is int e# illegal identifier name ? Why.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Welcome to JavaRanch!

Have you tried this? Did it work?

See JLS - 3.8 Identifiers.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Amit Bhat
Greenhorn

Joined: Jan 30, 2008
Posts: 3
Rules for Legal Identifiers

Definition: Letter = (A-Z, a-z or '$' or '_' )
Definition: Digit = ( 0 -9 )


An Identifier:
Must begin with a letter, '$', or "_".
After the first char, any char that is a letter (including '$' or '_') or digit may be used.
Cannot be a reserved word (aka keyword).
No spaces are allowed in the identifier.
Cannot have a Java operator symbol (because not a letter or digit).
No limit to the number of letters & digits (0 - 9).
 
Don't get me started about those stupid light bulbs.
 
subject: want to know