aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Identifiers in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Identifiers in Java" Watch "Identifiers in Java" New topic
Author

Identifiers in Java

Franc Giovinazzo
Greenhorn

Joined: Feb 26, 2002
Posts: 2
Hi all
my first post, so here goes ...
Most sources (including RHE) state that an identifier must begin with a letter, dollar sign ($) or an underscore(_).
I'm using the � (pound) sign and it works fine as follows.
int �anInt = 1;
I also believe that other currency symbols (I read this somewhere a long time ago) will work equally as well.
Can anyone explain this? If this question were to come up in the exam, how would you answer it?


Franc
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Welcome to Javaranch
Please see the following link which discusses that matter: http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=014967
You may also want to do a search in this forum since this topic has been brought up very often.
Finally, here is what the JLS says about that:
JLS 3.8 Identifiers


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Franc Giovinazzo
Greenhorn

Joined: Feb 26, 2002
Posts: 2
Thanks!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Identifiers in Java