慕尼黑的夜晚无繁华
增强for循环:for (String element : array) {
// Do something with element of type String
System.out.println(element);}传统的循环:(for (int i=0; i
// Reference to the item in array[position]
String element = array[i];
// More code using String element}看看这些论坛:https://blogs.oracle.com/CoreJavaTechTips/entry/using_enhanced_for_loops_withhttp://www.java-tips.org/java-se-tips/java.lang/the-enhanced-for-loop.html