返回列表 發帖
  1. public class CH01 {

  2.         public static void main(String[] args) {
  3.                 int n[][]=new int[][]{{1,2,3,4},
  4.                                             {5,6,7,8},
  5.                                             {9,10,11,12}};
  6.               
  7.                 for(int i=0; i<n.length; i++)
  8.                 {
  9.                                 for(int j=0; j<n[i].length; j++)
  10.                         System.out.println("n["+i+"]["+j+"]="+n[i][j]);
  11.                 }
  12.             }
  13.         }
複製代碼

TOP

返回列表