1. 2차원 배열의 형태
int[][] s = new int [3][5]; * [3]은 행의 개수, [5]는 열의 개수 * 이건 > 3,5의 배열이라고 한다. * 프로그래밍은 다 0부터 시작한다. 2차원 배열도 인덱스 값은 0부터 시작
행 : ————————
열 : ㅣㅣㅣㅣㅣㅣㅣㅣ
* 배열은 값은 변경할 수 있지만 공간 변경은 x !
* 2차원 배열도 공간 변경 (추가, 삭제) 불가능. 한 번 공간이 정해지면 끝!

- 2차원 배열에 데이터를 넣는 방법

- seat1 변수에 seats[0] (0행 값 {0, 0, 0, 1, 1, 0, 0, 0, 0, 0} )의 값을 넣었다.


- 그러니, seat1[i]를 출력하면, 0행의 값이 출력된다.
Share article