This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "legal identifiers" Watch "legal identifiers" New topic

legal identifiers

chinnanu chinna

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

why this one is not legal identifier
lalitha kaparapu

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

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:
subject: legal identifiers
It's not a secret anymore!