File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes char assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "char assignment" Watch "char assignment" New topic

char assignment

Kudret Serin
Ranch Hand

Joined: Aug 02, 2005
Posts: 167

Hi all,
I am new in this forum and have a basic question.
Why this code does not compile?

Thanks for your help.
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Although this question is more frequently asked in the SCJP forum, when I did a search in this forum (using \u000A) I found several including:

this one with the following response
Originally posted by Mike Gershman:
If you put '\u000a' or '\u000d' in a source program, the compiler treats it as an actual line break in your program text and breaks your statement into two lines, both of which will probably have a syntax error.

You need to use '\n' or '\r'.

and these which may clarify further if you want more detail:

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: char assignment
jQuery in Action, 3rd edition