• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unicode Characters

 
manisha ankolekar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pls explain why does the following code generates Compile-Time Error

String a="\u000a";//Unicode value for NewLine

String b="\u000d";//Unicode value for Carriage Return

My second question is:Wat is the use of Carriage Return???

Also explain why doesnt this code generate Error


String c="\u0008";//Unicode value for Backslash

String d="\u0009";//Unicode value for Tab

Pls help
Thank u
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The UNICODE escapes are processed early so you are not allowed to use the UNICODE escapes for carriage return and line feed. Look at the Java Language Specification 3.4.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic