aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Unicode Characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Unicode Characters" Watch "Unicode Characters" New topic
Author

Unicode Characters

manisha ankolekar
Greenhorn

Joined: Nov 26, 2006
Posts: 10
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

Joined: Feb 07, 2005
Posts: 2367
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unicode Characters
 
Similar Threads
dan exam dought
Unicode charector as String literal; finalize() method
strange problem in comments.
Comments //
about unicode.