Forums Register Login

char assignment

+Pie Number of slices to send: Send
Hi all,
I am new in this forum and have a basic question.
Why this code does not compile?

Thanks for your help.
+Pie Number of slices to send: Send
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:

https://coderanch.com/forums/

https://coderanch.com/t/390266/java/java/Invalid-Chararcter-constant

https://coderanch.com/t/389165/java/java/uni-code
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1282 times.
Similar Threads
chars
switch case
How do I get the '� ' symbol to appear in a JSP
oracle syntax
null terminated string for C++ Client
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:21:36.