728x90
int[] numbers = {1,2,3,4,5};
try {
int value = numbers[5];
}catch(ArrayIndexOutOfBoundsException e) {
System.out.println("invalid index specified");
}
728x90
'JAVA' 카테고리의 다른 글
Doubly Linked List 이중 연결 리스트 (0) | 2023.10.24 |
---|---|
ArrayList (0) | 2023.10.23 |
JAVA stream (2) | 2023.10.18 |
DAO생성에서 확인하고 넘어갈 개념 4가지 (0) | 2023.07.17 |
빌드 자동화 도구 Gradle vs Maven (0) | 2023.07.17 |
댓글