Welcome 微信登录

首页 / 软件开发 / JAVA / Java的“java.lang.ArrayIndexOutOfBoundsException: length=1; index=1”

Java的“java.lang.ArrayIndexOutOfBoundsException: length=1; index=1”2014-11-18Java中, 错误: "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1" ;

意思: 数组(Array)索引(Index)越界(OutOfBounds)异常(Exception),长度(length)为1, 索引(index)为1;

因为索引值(index)要小于长度值(length), 索引是从0开始;

根据位置信息, 判断错误位置:

at mzx.spike.earthquake.app.EarthquakeListFragment.refreshEarthquakes(EarthquakeListFragment.java:118)

表明: EarthquakeListFragment.java文件的第118行, 出现这个错误.