Java Tutorial for Beginners – 11 – Do-While loop

///Java Tutorial for Beginners – 11 – Do-While loop

Java Tutorial for Beginners – 11 – Do-While loop

FavoriteLoadingAdd to favorites

In this tutorial we will discuss the Do-While loop and it’s differences and similarities to the while loop.

Java468x60

source

By |2019-10-03T22:56:45+00:00October 3rd, 2019|Java Video Tutorials|15 Comments

15 Comments

  1. Ahmad Abdollahzadeh October 3, 2019 at 10:56 pm - Reply

    where can I find episode 12?

  2. Josue F Castillo October 3, 2019 at 10:56 pm - Reply

    what happened to the do loop tutorial !?

  3. Tejas Toley October 3, 2019 at 10:56 pm - Reply

    public static void main(String[] args)
    {
    int i =11;
    do
    {
    System.out.println("The number is:" +i);
    i++;
    }
    while(i<10);
    The output is:11

  4. AYBIN. V. K October 3, 2019 at 10:56 pm - Reply

    Thanks

  5. Free Stock October 3, 2019 at 10:56 pm - Reply

    mr.Ej please explain when to put curly braces!… thanks

  6. Steve Burrus October 3, 2019 at 10:56 pm - Reply

    Edward I notiuced that you seem to prefer to write in the "print" statement over the "println" statement. You prefer to see the output all on o ne line?

  7. Ammar Sadeq October 3, 2019 at 10:56 pm - Reply

    ok i found my mistake

  8. Ammar Sadeq October 3, 2019 at 10:56 pm - Reply

    My loop keeps going on and on…

    class dowhile {
    public static void main (String[] args) {

    int topNumber = 15;
    int bottomNumber = 1;

    do
    {
    System.out.print ("This is a loop");

    }
    while (bottomNumber < topNumber);
    }
    }

  9. Sean Flanagan October 3, 2019 at 10:56 pm - Reply

    Thanks for another good video, which I've given a thumbs-up. Is one of the differences between the while loop and the do-while loop that you have to put a semi-colon after the while condition?

  10. Alex Shi October 3, 2019 at 10:56 pm - Reply

    is topNumber = topNumber + 1; an alternative to topNumber++;?

  11. Matija Ninkovic October 3, 2019 at 10:56 pm - Reply

    My program didn't work before I didn't put" bottomNumber++" (in my case "donjiBroj++") after "while" function.

    class doWhile {
    public static void main (String[] args) {

    int gornjiBroj = 15;
    int donjiBroj = 16;

    do
    System.out.print ("Ovo je loop!");

    while (donjiBroj < gornjiBroj);
    donjiBroj++;
    }
    }

    So, EJ Media what was that all about? I mean, compiler sent me that it expects "while" right after "do".

  12. Sahil Katia October 3, 2019 at 10:56 pm - Reply

    Hello,
    In dowhileloop,
    I deleted the condition bottomNumber++;
    and run the program when topnumber was 10 and bottomNumber was 11. It show me one result.
    But when I try to run the program with topNumber 10 and bottomNumber 1. It didn't 
    show any result.( with deleted condition bottomNumberr++;).

  13. prabakar .u October 3, 2019 at 10:56 pm - Reply

    awesome 🙂

  14. quynhessence October 3, 2019 at 10:56 pm - Reply

    Why would you ever want to use a do while loop? Is it to get it to run at least once? What is one example you'd want that to happen?

  15. NoviceLeagacy October 3, 2019 at 10:56 pm - Reply

    11??

Leave A Comment

*