class A {
public static void main(String[] args) {
char a = '∀';
System.out.println(a);
char castle = '';
System.out.println(castle);
}
}
我可以很好地制作倒置的A字符,但是当我尝试制作城堡字符时,它会出现3个编译错误。为什么?
$ javac A.java && java A
A.java:5: unclosed character literal
char castle = '';
^
A.java:5: illegal character: \57159
char castle = '';
^
A.java:5: unclosed character literal
char castle = '';
^
3 errors
"\uD83C\uDFF0"
- millimoose"\uD834\uDF47"
。 - Ilmari Karonen