谢谢大家在回答问题之前回答.我有另一个问题.当我将数组写为ArrayBoolean时,我得到一个异常java.lang.ArrayIndexOutOfBoundsException:0
我试图通过谷歌找到但不能.如果你知道请与我分享.
这意味着你尝试写入空数组.
来自javadoc ArrayIndexOutOfBoundsException:
* Thrown to indicate that an array has been accessed with an
* illegal index. The index is either negative or greater than or
* equal to the size of the array.
Run Code Online (Sandbox Code Playgroud)
所以,0是= =数组的大小,所以你的数组是空的.
| 归档时间: |
|
| 查看次数: |
6243 次 |
| 最近记录: |