1. 배열이란

int[] arr = new int[5];

2. 배열이 필요한 이유

❌ 배열 없이

int a = 10;
int b = 20;
int c = 30;

⭕ 배열 사용

int[] arr = {10, 20, 30};

👉 반복문과 함께 사용하면 강력


3. 배열 선언 방법

1) 선언 + 생성

int[] arr = new int[3];

2) 선언 + 초기화

int[] arr = {1, 2, 3};

3) new + 초기화