(String[] args)
| 3 | */ |
| 4 | class Array2Test { |
| 5 | public static void main(String[] args) { |
| 6 | int[][] arr = {{1,2,3},{4,5,6},{7,8,9}}; |
| 7 | |
| 8 | for(int x=0; x<arr.length; x++) { |
| 9 | //System.out.println(arr[x]); |
| 10 | /* |
| 11 | int[] a = arr[x]; |
| 12 | for(int y=0; y<a.length; y++) { |
| 13 | System.out.print(a[y]+" "); |
| 14 | } |
| 15 | System.out.println(); |
| 16 | */ |
| 17 | |
| 18 | for(int y=0; y<arr[x].length; y++) { |
| 19 | System.out.print(arr[x][y]+" "); |
| 20 | } |
| 21 | System.out.println(); |
| 22 | } |
| 23 | } |
| 24 | } |