avatar
expression in unicode# Java - 爪哇娇娃
a*n
1
用QQ跟国内的人聊天,无数次被问到相同的问题——“在美国也能用QQ阿?不是只有中
国才能用QQ吗?”
avatar
s*i
2
String b = "\u000A"; is syntax error.
String b = "\u0009"; is right,
String b = "\u001A"; is right too.
why?
How to input "\u000A" into a variable?
thx
avatar
w*s
3
因为他们从来没在qq上碰到美国人。

【在 a*****n 的大作中提到】
: 用QQ跟国内的人聊天,无数次被问到相同的问题——“在美国也能用QQ阿?不是只有中
: 国才能用QQ吗?”

avatar
o*e
4
"\n"
who cares why, it's very special case.
but there's one paragraph just to explain
this in the java spec if you want to know.

【在 s*****i 的大作中提到】
: String b = "\u000A"; is syntax error.
: String b = "\u0009"; is right,
: String b = "\u001A"; is right too.
: why?
: How to input "\u000A" into a variable?
: thx

avatar
k*o
5
嗯,白痴也吃饭喝水,所以吃饭喝水的都是白痴。
中国教育最大的问题就是没有在基础教育阶段开设逻辑课。

【在 a*****n 的大作中提到】
: 用QQ跟国内的人聊天,无数次被问到相同的问题——“在美国也能用QQ阿?不是只有中
: 国才能用QQ吗?”

avatar
s*i
6
The problem is you can not input the unicode from
"\u000A"
"\u000B"
"\u000C"
"\u000D"
...

【在 o***e 的大作中提到】
: "\n"
: who cares why, it's very special case.
: but there's one paragraph just to explain
: this in the java spec if you want to know.

avatar
s*d
8
简单说一下
这一行程序:
String s = "\u000A";
java编译器会把它读为(分成2行):
String s = "
";
这样就出现了unclosed string literal的错误了.

【在 s*****i 的大作中提到】
: The problem is you can not input the unicode from
: "\u000A"
: "\u000B"
: "\u000C"
: "\u000D"
: ...

avatar
m*t
9

If you need something you can generalize and put through a loop,
try this:
String s = new String(new byte[]{10});
Note that's a piece of what-the-hell-is-it-trying-to-do code though.
8-)

【在 s*****i 的大作中提到】
: The problem is you can not input the unicode from
: "\u000A"
: "\u000B"
: "\u000C"
: "\u000D"
: ...

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。