摘要: 增强for循环 :forEach 反编译后可以看到实际使用的仍然是Iterator+while遍历的 forEach的优点是写法简单,缺点是不能使用xxx.remove(e)或者iter.remove(), 如果有删除的需要,还是老老实实用Iterator 对于数组的遍历,使用的是length遍历 阅读全文
posted @ 2018-08-25 09:17 funny_coding 阅读(2643) 评论(0) 推荐(0) 编辑
build beautiful things, share happiness