返回列表 發帖
  1. public class nsezz {
  2.         public static void main(String[] args) {
  3.                 int a[][][] = {{{ 1, 2, 3,4 },{5,6,7,8},{9,10,11,12}},
  4.                                 {{13,14,15,16},{17,18,19,20},{21,22,23,24} }};

  5.                 for (int i = 0; i < 2; i++) {
  6.                         for (int k = 0; k < 3; k++)
  7.                                 for (int j = 0; j < 4; j++)
  8.                                 System.out.print("a["+i+"]["+k+"]["+j+"]=: "+a[i][k][j]+" \n");               
  9.                 }
  10.         }
  11. }
複製代碼

TOP

返回列表