~Onlooker
2008-09-17 16:44
采纳率: 0%
浏览 445
已采纳

Java'for each'循环是如何工作的?

Consider:

List<String> someList = new ArrayList<String>();
// add "monkey", "donkey", "skeleton key" to someList
for (String item : someList) {
    System.out.println(item);
}

What would the equivalent for loop look like without using the for each syntax?

转载于:https://stackoverflow.com/questions/85190/how-does-the-java-for-each-loop-work

26条回答 默认 最新

相关推荐 更多相似问题