需求 获取获取List集合中,指定下标之间的数据。 代码实现 测试:在list中添加数据0-10;获取下标为2和8之间的数据 @Test public void test() { List<Integer> list = new ArrayList<>(); for (int i = 0; i <= 10; i++