for循环语句

/**
 *  需求:基本练习
 *  思路:略
 *   
 *  步骤:略
 */
public class Demo_1{
    public static void main(String[] arge){
        for(int x=1;x<3;x++)
        {
         System.out.println("x="+x);
        }
    }
}


/**
 *  需求:基本练习
 *  思路:略
 *   
 *  步骤:略
 */
public class Demo_1{
    public static void main(String[] arge){
    int x=1; 
    for(System.out.println("a");
                x<3;
        System.out.println("c"))//没有布尔值无法正常输出
        System.out.println("d");
            x++;
    }
}

 

 

posted on 2017-09-28 06:50  马文奇  阅读(115)  评论(0编辑  收藏  举报

导航