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