wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes variable names Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "variable names" Watch "variable names" New topic
Author

variable names

Samuel Fitzpatrick
Greenhorn

Joined: Jan 23, 2003
Posts: 10

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

Joined: Jan 23, 2003
Posts: 10

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: variable names