![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
When you compile a java program first of all it translates the Unicode escapes ( e.g. \u000a ). At this stage it doesn't differentiate between comments and non-comments lines. So it is immaterial whether you write Note the two lines translation of your one line code which is obviouly wrong. That is why in java we have Escape Sequences like \b, \t, \n, \f etc. Since \u0002 is \n , you are supposed to write char c = '\n' ; . You are also not supposed to write char c = '\u002d' ; . You should use '\r' instead. Thanx Replies: |
Sponsored Links
|