File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes legal identifiers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "legal identifiers" Watch "legal identifiers" New topic
Author

legal identifiers

chinnanu chinna
Greenhorn

Joined: May 28, 2007
Posts: 10
int e#;

why this one is not legal identifier
lalitha kaparapu
Greenhorn

Joined: Nov 05, 2007
Posts: 16
Hi Chinna,

Legal identifiers must be composed of only Unicode characters,
numbers, currency symbols, and connecting characters (like underscores).

In int e#;
You are including # which does not come under above characters..So its not legal.
chinnanu chinna
Greenhorn

Joined: May 28, 2007
Posts: 10
thank you
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
Also, please note that identifiers may not begin with a digit. But digits are allowed as the second or subsequent characters. This is primarily to avoid conflicts with numeric literals (e.g. 1L or 1.0f).


SCJP 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: legal identifiers