내가 안드로이드 응용 프로그램 작업, 다음과 같은 코드 세그먼트에서 이상한는 ArrayIndexOutOfBoundsException를 얻고 디버깅이 필요하십니까? 나는 모든 가능성을 점검했다고 생각했다.이상한는 ArrayIndexOutOfBoundsException
-2
A
답변
2
당신은 당신의 루프는 변수를 테스트 "J"에서 5 번째 줄에 ... 대신 J for (int j = 0; j < temp.length; i++)
의 루프이에
+0
감사! 내가 할 수있을 때이 대답을 받아 들일 것입니다 (4 분 안에). – Phil
1
을 나는를 증가되지만 "I"와 함께 증가 및 인덱싱된다.
편집 : Ninja'd
관련 문제
- 1. ArrayIndexOutOfBoundsException
- 2. ArrayAdapter 및 ListView - ArrayIndexOutOfBoundsException
- 3. Java Applet - ArrayIndexOutOfBoundsException
- 4. ListView의 다른 ArrayIndexOutOfBoundsException
- 5. Vibrator.vibrate() throws ArrayIndexOutOfBoundsException
- 6. 자바 애플릿 - ArrayIndexOutOfBoundsException (pt 2)
- 7. Java RegEx replaceAll throws ArrayIndexOutOfBoundsException
- 8. XMLEntityScanner.peekChar의 ArrayIndexOutOfBoundsException HttpRequest에서 XML 읽기
- 9. 빠른 수정 Java 오류 ArrayIndexOutOfBoundsException
- 10. ArrayIndexOutofBoundsException 오류가 발생했습니다. 이유는 모르겠지만
- 11. Java 및 최대 절전 모드에서 ArrayIndexOutOfBoundsException
- 12. for() 루프에서 중첩 된 java throws ArrayIndexOutOfBoundsException
- 13. ArrayIndexOutOfBoundsException 상속을 사용하는 Object의 ArrayList를 유지하려고 시도합니다.
- 14. Assert (i> = 0) 이후의 ArrayIndexOutOfBoundsException
- 15. 문자열에 대한 분할 작업 후 ArrayIndexOutOfBoundsException 오류가 발생했습니다.
- 16. 이 Java PreparedStatement가 ArrayIndexOutOfBoundsException 0을 throw하는 이유는 무엇입니까? parameterIndex = 1입니까?
- 17. Eclipse 디버깅, 중단 점 - "ArrayIndexOutOfBoundsException : 캐치 및 캐치되지 않음", 이것이 의미하는 바는 무엇입니까?
- 18. 3 자 영어 이외의 문자열에서 정규식 오류 (Java :: JavaLang :: ArrayIndexOutOfBoundsException : 4)
- 19. 자바 2 차원 배열에 값을 할당 할 수 없습니다 -는, ArrayIndexOutOfBoundsException
- 20. TCP 윈도우 업데이트 란 무엇입니까?
- 21. 예외 처리를 구현하는 Java
- 22. 가 onItemClick이 GalleryView
- 23. 안드로이드/자바 희귀하고보기 흉한 예외로 인해 강제 종료 close
- 24. 왜 ArrayIndexOutOfBoundsException가 여기에서 발생합니까?
- 25. C#으로 변환하는 방법 (아래 코드 참조)?
- 26. 방법 선형 배열
- 27. 어레이 부적절한 도전
- 28. 죽은 단순하지만 긴 Java PrintWriter 문제
- 29. 시도/캐치와 루프 제어
- 30. 소켓이있는 웹 페이지 얻기
어떤 줄이 오류입니까? –
@simplyianm 그것은 temp를 null로 만들지 않고 temp의 크기가 0보다 크고, temp [i에 액세스 할 때 오류가 루프에 있음을 확인하려고하기 때문에 코드를 읽는 사람이라면 누구나 직선적이어야합니다. ]. – Phil