增强for循环
package Base;
//增强for循环
public class Demon12 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] numbers= {10,20,30,40,50};
for(int x:numbers) {//将numbers中的值赋值给x
System.out.println(x);
}
}
}
package Base;
//增强for循环
public class Demon12 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] numbers= {10,20,30,40,50};
for(int x:numbers) {//将numbers中的值赋值给x
System.out.println(x);
}
}
}