java.lang.ArrayIndexOutOfBoundsException: [英] java.lang.ArrayIndexOutOfBoundsException:

查看:110
本文介绍了java.lang.ArrayIndexOutOfBoundsException:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

推荐答案

发布代码时请使用代码标签。


如果不知道导致错误的代码行数,很难确切地说出问题所在。但这是一个非常明确的错误信息。基本上,你有一个数组但是你试图访问一个比你有多少数组的元素。


我要在黑暗中拍摄并且说它是第18行。当你到达最后一个单词时,你也试图在最后一个单词之后访问该单词,这是不可能的。你需要循环一个比当前循环更少的东西。
Please use code tags when posting code.

It''s hard to say exactly what the problem is without knowing the line number of code causing the error. But that is a very clear error message. Basically, you have an array but you are trying to access an element of the array that is larger than how many you have.

I''m going to take a shot in the dark and say it''s line 18. When you reach the last word, you are also trying to access the word after the last word, that''s impossible. You need to loop one less than you''re currently looping.


请给我一些指导,我无法修复它。
please give me some guideline, I could not fix it.


我做了给你指导。你需要告诉我你改变了什么。如果我不知道你做了什么,我不能告诉你你做错了什么。
I did give you guidance. You need to show me what you''ve changed. I can''t tell you what you did wrong if I don''t know what you did.


这篇关于java.lang.ArrayIndexOutOfBoundsException:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆