aspose 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
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
Consider Paul's rocket mass heater.
subject: legal identifiers