• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

\u0063 is a indetifier

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just found this in "Test cafe "v.3.00
char \u0063='\u0063' -is ok .
I try it but javac says:"...[10:1] not a statement".
Who is right
 
Lakshmi Saradha
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using the jdk1.4 compiler. This piece of code did not give any complilation error? What is the version of the compiler you are using?
 
dennis zined
Ranch Hand
Posts: 330
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
\u0063 is not an identifier. It is the unicode representation of the c character.
Compile the ff. code:

Decompiling it shows the ff. revised code:

[ November 27, 2003: Message edited by: dennis zined ]
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
char \u0063='\u0063' -is ok .
Hi RihaiM, the semicolon ; is missing. Could that be the reason for your compiler error?
char \u0063='\u0063';
----
Is \u0063 a Unicode representation of the character c or is \u0063 a Java language representation of a Unicode character?
 
dennis zined
Ranch Hand
Posts: 330
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi meticulous Marlene. Good point....it is a Java language representation of a Unicode character.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic