最后的输出猜测是对的么
public static void main(String[] args){
char[] Str;
Str = new char[]{'a','b','c','d','e'};
for(int i = 0; i < Str.length;i++){
System.out.println(Str[i]);
System.out.println(+Str[i]);
//怀疑最后加号作为运算符:0+Str[i]得出结果是int
}
}
public static void main(String[] args){
char[] Str;
Str = new char[]{'a','b','c','d','e'};
for(int i = 0; i < Str.length;i++){
System.out.println(Str[i]);
System.out.println(+Str[i]);
//怀疑最后加号作为运算符:0+Str[i]得出结果是int
}
}
2017-04-22
举报