• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

variable names

 
Greenhorn
Posts: 10
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic