Java Unicode variable names

Viewed 13088

I got into an interesting discussion in a forum where we discussed the naming of variables.

Conventions aside, I noticed that it is legal for a variable to have the name of a Unicode character, for example the following is legal:

int \u1234;

However, if I for example gave it the name #, it produces an error. According to Sun's tutorial it is valid if "beginning with a letter, the dollar sign "$", or the underscore character "_"."

But the unicode 1234 is some Ethiopic character. So what is really defined as a "letter"?

2 Answers
Related