我正在使用一个迭代器来遍历一个集合我想获取当前元素的索引.
I am using an Iterator to iterate through a collection and I want to get the current element's index.
我该怎么做?
使用自己的变量并在循环中递增.
Use your own variable and increment it in the loop.
这篇关于使用迭代器时如何获取当前循环索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Java从数组中删除重复项?Java Remove Duplicates from an Array?(Java从数组中删除重复项?)
Eclipse 的 egit 插件egit plugin for Eclipse(Eclipse 的 egit 插件)
Gitlab 无法打开 git-upload-pack 错误Gitlab cannot open git-upload-pack error(Gitlab 无法打开 git-upload-pack 错误)
如何修复调用失败来自服务器的意外响应:在 AnHow to fix Invocation failed Unexpected Response from Server: Unauthorized in Android studio(如何修复调用失败来自服务器的意外响应:在
如何在 Eclipse 中添加 GitLab 存储库?How to add GitLab repository in Eclipse?(如何在 Eclipse 中添加 GitLab 存储库?)
AES 加密,解密文件中有多余的垃圾字符AES encryption, got extra trash characters in decrypted file(AES 加密,解密文件中有多余的垃圾字符)