pagination in java?

前端 未结 4 446
孤街浪徒
孤街浪徒 2021-01-03 10:12

i want the numbers to be displayed in this format..

1 2 3 4 5 ^
where if i press 5, then it should display from 5 to 10

5 6 7 8 9 10

til

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 10:48

    If you have a List of records then you can do pagination using subList method of List.

    List.subList(fromIndex, endIndex);

    returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive

提交回复
热议问题