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(循环变量类型 循环变量:要被遍历的对象){ * 循环体; * } * */
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(循环变量类型 循环变量:要被遍历的对象){ * 循环体; * } * */