ArrayIndexOutOfBoundsException : 0 이 발생하는 이유가 뭔가요?
조회수 2400회
... import java.util.Scanner;
public class Driver { public static void main(String[] args) {
Sum sumObject = new Sum();
int upper = Integer.parseInt(args[0]);
Thread child = new Thread(new Summation(upper, sumObject));
child.start();
try {
child.join();
System.out.println("총합: " + sumObject.getSum());
} catch (InterruptedException e) {
}
}
} ...
자바 스레드 예제인 위 코드를 실행중인데 계속 오류가 뜨네요. 왜 저 오류가 뜨는건가요?
댓글 입력