int[] array가 정의된 메소드나 클래스가 없어서,,, 크기가 작아서 오류가난다라는 것을 알수가 없네요 그냥 throws ArrayIndexOutOfBoundsException 붙이니깐 문제를 푼걸로 나오네요 ㅋㅋ
1 2 3 4 5 public class ExceptionExam { public int get50thItem(int []array) throws ArrayIndexOutOfBoundsException{ return array[49]; } }
1 2 3 4 5
public class ExceptionExam { public int get50thItem(int []array) throws ArrayIndexOutOfBoundsException{ return array[49]; } }
1 2 3 4 5 6 public class ExamExam{ public static void main(String[]args){ ExceptionExam ex = new ExceptionExam(); } }
1 2 3 4 5 6
public class ExamExam{ public static void main(String[]args){ ExceptionExam ex = new ExceptionExam(); } }
저도 그렇게 나오는데
문제 푸는 입장에서 문제를 이렇게 제시하면 이해하는사람 아무도 없을듯 주입식 교육처럼 이렇게해라 이거랑 다를게 없음