Java中增强for循环

package tk.zhangwei.array2;
/***
 * 
 * jdk新特性
 */
import java.util.Arrays;

public class test02 {
    public static void main(String[] args){
        int[] a = {15,12,45,84,87,23,42};

        for(int i : a){
            System.out.print(i+" ");
        }
    }
}

你可能感兴趣的:(JavaSE笔记)