# 중첩 반복문 #### CODE <a class='btn btn-default' href='/codes/94275'>Link</a> ``` public class Matrix { public static void main(String[] args) { // 입력값 받기 int r = Integer.parseInt(args[0]); int c = Integer.parseInt(args[1]); // 매트릭스 출력 printMatrix(r, c); } public static void printMatrix(int rowMax, int columnMax) { for (int i = 0; i < rowMax; i++) { for (int j = 0; j < columnMax; j++) { System.out.print("* "); } System.out.println(); } } } ``` #### INPUT ``` 3 7 ``` #### OUPUT ``` * * * * * * * * * * * * * * * * * * * * * ```
특별한 이유는 없습니다 해당 강의에서 printf 를 주로 사용해서 그래요