1, 2, 3, 4, 5};
System.out.println(bytes);
System.out.println(ints);
输出
[B@1b6d3586
[S@4554617c
打印数组内容..., 得到友好的打印
public static void main(String args[]) throws Exception {
byte[] bytes = {
1,...xyz, null]
{
1=aa, 2=bb, 3=cc, 4=null}
public class ArrayUtils {
public static String toString...array == null) {
return "{}";
}
return new ToStringBuilder().append(array).toString...() {
return this.buffer.toString();
}
}
public static class ToStringStyle