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+"  ");
        }

    }
    
    
}

 

posted @ 2019-03-21 15:40  送外卖的小菜鸟  阅读(144)  评论(0编辑  收藏  举报