for增强

public class test {
	public static void main(String[] args) {
		int[] array = {1,2,3,4,5};
		
                for(int a:array){
			System.out.println(a);
		}
	}
}
/*	for(循环变量类型 循环变量:要被遍历的对象){
 * 		循环体;
 * }
 * */                    

  

原文地址:https://www.cnblogs.com/Akke/p/4957625.html