list转iterable
时间: 2023-09-05 09:12:39 浏览: 120
要将List转换为Iterable,可以使用List的listIterator()方法来获取一个ListIterator,ListIterator是Iterable的子接口。ListIterator可以用于遍历列表中的元素。通过调用listIterator()方法,可以获得一个迭代器对象,然后可以使用该迭代器对象来遍历列表中的元素。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [【Java】Iterable、Collection、List 的常见方法签名以及含义](https://blog.csdn.net/tq411810317/article/details/128787670)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [【JavaSE】Iterable,collection以及List的常见方法签名以及含义](https://blog.csdn.net/weixin_53939785/article/details/125095805)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文