How to get data between specified subscripts in a List collection
This article shows you how to get the data between the specified subscripts in the List collection. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Demand
Gets the data between the specified subscripts in the List collection.
Code implementation
Test: add data 0-10 to list; get data with subscript between 2 and 8
@ Testpublic void test () {List list = new ArrayList (); for (int I = 0; I