这个for循环是什么意思? [英] What does this for loop mean?

查看:154
本文介绍了这个for循环是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

for(String name: names){
   System.out.printli(name);
}

第一行是什么意思?我只理解(int i = 0; i <= 10; i ++)格式的

What does the first line mean? I only understand the for(int i=0; i<=10;i++) format.

推荐答案

它被称为 for循环

您的代码读取为名称中每个字符串名称的

Your code reads as for each String name in names.

这篇关于这个for循环是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆