While Loop Basics

package hlo;
public class While {
public static void main(String[]args) {
int no=2;
//0 //2 //5
----------> while(no<=5) {
"From 2 to 5, inclusive, anything less than or equal to."
System.out.println(no);
no=no+1; //2=2+1 =3
// 3=3+1=4
// 4=4+1=5
}
}
}
package hlo;

public class While {
    public static void main(String[]args) {
        int no=2;

          //0  //2 //5
---------->  while(no<=5) {
    "From 2 to 5, inclusive, anything less than or equal to."
            System.out.println(no);
            no=no+1; //2=2+1 =3
                                 // 3=3+1=4
                                 // 4=4+1=5
        }

    }

}
package hlo; public class While { public static void main(String[]args) { int no=2; //0 //2 //5 ----------> while(no<=5) { "From 2 to 5, inclusive, anything less than or equal to." System.out.println(no); no=no+1; //2=2+1 =3 // 3=3+1=4 // 4=4+1=5 } } }

Enter fullscreen mode Exit fullscreen mode

原文链接:While Loop Basics

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
Nobody can go back and start a new beginning, but anyone can start today and make a new ending.
没有人可以回到过去从头再来,但是每个人都可以从今天开始,创造一个全新的结局
评论 抢沙发

请登录后发表评论

    暂无评论内容