`

java jdk5.0中出现的新特性——增强的“for”循环

阅读更多
增强的“for”循环(Enhanced For loop)



For-Each循环的加入简化了集合的遍历
其語法如下
for(type element : array) { 
     System.out.println(element)....
}


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics