public void DimentionArray() { int[][] arr = {{1, 2, 3, 4, 5}, {3, 4, 5, 6, 7}, {5, 5, 5, 5, 5}, {7, 7, 7, 7, 7}}; int sum = 0; int avg = 0; int count = 0; for(int i = 0; i < arr.length; i++) { for(int j = 0; j < arr[i].length; j++) { //합계 sum += arr[i][j]; count++; } } System.out.println("합계: " + sum); System.out.println("평균: " + (double) sum / count); } ▼실행결과 합계: 100 평균: 5 2차원 배열은 행과 열로 구성되어 있..