标签: java arrays tostring
我想在调用arr.toString()时打印数组。我怎么能这样做?
arr.toString()
Integer[] arr = new Integer[10]; for(int i = 1; i <= 5; i++) { arr[i] = (i); } System.out.println(arr.toString() + " " + arr.length);