// Java:如何将一维字符串/整数数组表示为二维整数数组?我将衷心感谢您的帮助。
package intro;
public class ArrayTest{
public static void main(String[] args) {
int arr[][]= new int[4][4];
int month_days [] = {31,28,31,30,31,30,31,31,30,31,30,31,13,14,15,16};
int size =4;
//System.out.println(size);
for (int i = 0, k = 0; i < size; i++, k++) {
for(int j=0; j <size; j++){
arr[i][j]= month_days[k++];
//System.out.println(month_days[k++] + " ");
System.out.print(arr[i][j] + " ");
}
System.out.println();
}
}
}