for (Goods goods :goodsSet) { goods.setBrand(null);} 尤其小括号里

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 11:24:07

for (Goods goods :goodsSet) { goods.setBrand(null);} 尤其小括号里
for (Goods goods :goodsSet) { goods.setBrand(null);} 尤其小括号里

for (Goods goods :goodsSet) { goods.setBrand(null);} 尤其小括号里
jdk 1.5中新语法.就是遍历list或者set或者数组用的.
你可以理解成这样
for(int i=0;i