public class HelloWorld {标签:arr,int,打印,不用,System,length,arr2,数组,out From: https://www.cnblogs.com/nulicheng/p/17855888.html
public static void main(String[] args) {
//打印数组 [11,22,33]
int[] arr = new int[]{11, 22, 33};
// arr = [0,0,0]
int[] arr2 = new int[arr.length]; //打印数组arr2
for (int i = 0; i < arr.length; i++) {
arr2 = arr;
//arr2 = [0,0,0]
}
System.out.print("[");
for (int i = 0; i < arr2.length; i++) {
System.out.print(i ==arr.length-1 ?arr[i]:arr2[i] +",");
}
System.out.print("]");
}
}