for 循环增强

package cn.zhou.com;
/*
 * 增强for循环 
 * 
 * for(int i:arr)
 * {
 *      System.out.print(i+1+"  ");
 * }
 */
public class 系统类 {
    public static void main(String[] args) {
        show();
    }
    public static void show(){
        int []arr={4,5788,4546,54,545,4};
        for(int i:arr)
        {
            System.out.print(i+1+"  ");
        }

    }
    
    
}
原文地址:https://www.cnblogs.com/ZXF6/p/10572102.html