我做了测试
int[] i = {1, 2, 3};
short[] s = {2, 3, 4};
long[] l = {222, 333, 444};
char[] c = {'a', 'b', 'c'};
byte[] b = {1, 2, 3};
float[] f = {1.1f, 1.2f, 2.0f};
double[] d = {2.2, 3.3, 4.0};
boolean[] boo = {true, false, true};
System.out.println(i);
System.out.println(s);
System.out.println(l);
System.out.println(c);
System.out.println(f);
System.out.println(d);
System.out.println(b);
System.out.println(boo);
但只是char[]中的东西出来了,应和包裹类没关系。
请问为什么会这样?
|