写一段java代码,把一堆数组赋值给二堆数组
时间: 2023-04-08 16:03:41 浏览: 108
数组互相赋值
好的,以下是Java代码,可以将一堆数组赋值给二堆数组:
```
int[] arr1 = {1, 2, 3, 4, 5};
int[] arr2 = {6, 7, 8, 9, 10};
int[] arr3 = {11, 12, 13, 14, 15};
int[] arr4 = {16, 17, 18, 19, 20};
int[][] arrA = {arr1, arr2};
int[][] arrB = {arr3, arr4};
```
这段代码将arr1和arr2赋值给arrA,将arr3和arr4赋值给arrB。
阅读全文