数组-增强for循环
数组-增强for循环
增强for循环专门用于读取数组或集合中所有的元素。
String[] ss = {"aa","bbb","cccc"};
for(String temp:ss){
System.out.println(temp);
}
输出:
aa
bbb
cccc
增强for循环专门用于读取数组或集合中所有的元素。
String[] ss = {"aa","bbb","cccc"};
for(String temp:ss){
System.out.println(temp);
}
输出:
aa
bbb
cccc