Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

variable names

 
Samuel Fitzpatrick
Greenhorn
Posts: 10
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does the compiler give the error:

when the Unicode character ALT 0215 is used in a variable name?
My guess (which is most likly wrong) is because Java allows characters in the variable name to be any characters except those used as operators ( + , - , or * ), and ALT 0215 (�) looks like a multiplication operator.
Thanks.
 
Samuel Fitzpatrick
Greenhorn
Posts: 10
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a variable which would give the error is:

which is t(ALT 0214)(ALT 0215)(ALT 0216)
a variable which does not give the error is:

which is t(ALT 0214)(ALT 0216)
I know naming variables like this is not standard, but I am just wondering why both ALT 0214 and ALT 0216 are allowed and ALT 0215 is not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic