• 코드:
 
1
public class prog {
2
    public static void main(String[] args) {
3
        int[][] arr = {
4
                {10, 20, 30},
5
                {40, 50, 60}
6
        };
7
        
8
        for (int i = 0; i < arr.length; i++) {
9
            for (int j = 0; j < arr[i].length; j++) {
10
                System.out.print(arr[i][j] + " ");
11
            }
12
            System.out.println();
13
        }
14
    }
15
}
표준입력 & 실행옵션