加强循环

加强循环

public class Test {
	 
	public static void main(String[] args) {
		int [] scores = {30,40,50};
		for (int score : scores) {//加强循环foreach,快捷方式ALT+/即可出现
			System.out.println(score);
		}
	}
}

输出结果:

猜你喜欢

转载自blog.csdn.net/weixin_42867975/article/details/113026142