File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Identifiers in Java

 
Franc Giovinazzo
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Franc Giovinazzo
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic