Skip to content

Commit d1dc97a

Browse files
authored
한글화
1 parent 24286e9 commit d1dc97a

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎src/effectivejava/chapter10/item74/IndexOutOfBoundsException.java‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
package effectivejava.chapter10.item74;
22

3+
// 실패 상황을 온전히 포착하도록 수정해본 IndexOutOfBoundsException (405쪽)
34
public class IndexOutOfBoundsException extends RuntimeException {
45
private final int lowerBound;
56
private final int upperBound;
67
private final int index;
78

89
/**
9-
* Constructs an IndexOutOfBoundsException.
10+
* IndexOutOfBoundsException을 생성한다.
1011
*
11-
* @param lowerBound the lowest legal index value
12-
* @param upperBound the highest legal index value plus one
13-
* @param index the actual index value
12+
* @param lowerBound 인덱스의 최솟값
13+
* @param upperBound 인덱스의 최댓값 + 1
14+
* @param index 인덱스의 실젯값
1415
*/
1516
public IndexOutOfBoundsException(int lowerBound, int upperBound,
1617
int index) {
17-
// Generate a detail message that captures the failure
18+
// 실패를 포착하는 상세 메시지를 생성한다.
1819
super(String.format(
19-
"Lower bound: %d, Upper bound: %d, Index: %d",
20+
"최솟값: %d, 최댓값: %d, 인덱스: %d",
2021
lowerBound, upperBound, index));
2122

22-
// Save failure information for programmatic access
23+
// 프로그램에서 이용할 수 있도록 실패 정보를 저장해둔다.
2324
this.lowerBound = lowerBound;
2425
this.upperBound = upperBound;
2526
this.index = index;

0 commit comments

Comments
 (0)