class c1 { public static void main(String a[]) { int �; � = 10; System.out.println("The value is : " +�); } } I thought that this will give an error but it is getting excecuted normally. Any variable should start with an alphabet or underscore or currrency. But I am surprised to see that the value between Alt-128 to Alt-158 also comes under this category. so pls. give explanation.
Thomas Paul
mister krabs
Ranch Hand
Joined: May 05, 2000
Posts: 13974
posted
0
This has nothing to do with Java News so I will move this to... hmmmm.... Java In Genral (Intermediate).
An identifier (variable) should start with a letter - including underscore (_) or dollar sign ($) - followed by letters or digits. A "letter" uses the unicode definition, which includes lots of characters from many languages. See javadoc for Character.isJavaIdentifierStart() or the JLS section about identifiers http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.