sublist index out of bound exception

后端 未结 3 1698
无人共我
无人共我 2021-01-21 14:45

Whenever I am running my xhtml. It is giving me the following exception. The value of statusindex object is 5. I am using JQuery for lazy scrolling,so when my xhml page getMoreS

3条回答
  •  无人及你
    2021-01-21 15:04

    List.subList()'s documentation is very clear:

    Throws: IndexOutOfBoundsException - for an illegal endpoint index value (fromIndex < 0 || toIndex > size || fromIndex > toIndex)

    In your case, toIndex > size:

    java.lang.IndexOutOfBoundsException: toIndex = 30
    

提交回复
热议问题