增强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);
	}
}

}

posted @ 2025-03-20 22:12  骆驼刺破仙人掌007  阅读(4)  评论(0)    收藏  举报