数组-增强for循环

数组-增强for循环

增强for循环专门用于读取数组或集合中所有的元素。

String[] ss = {"aa","bbb","cccc"};
        for(String temp:ss){
            System.out.println(temp);
        }

输出:

aa
bbb
cccc

 

posted @ 2021-08-09 20:26  风中一抹黄  阅读(140)  评论(0)    收藏  举报