【发布时间】:2013-10-10 17:47:31
【问题描述】:
所以我只是想知道是否有一种方法可以在一行中打印出多个 char 变量,而不会像传统的 print 语句那样将 Unicode 添加在一起。
例如:
char a ='A';
char b ='B';
char c ='C';
System.out.println(a+b+c); <--- This spits out an integer of the sum of the characters
【问题讨论】:
-
你想要一个
String,而不是把三个字符加在一起。char是一个无符号的 16 位整数。