About 371,000 results
Open links in new tab
  1. java - ¿Cual es la diferencia del While y Do While? - Stack Overflow …

    Oct 5, 2018 · 7 While y Do While son bucles, su contenido "puede" ejecutarse repetidamente, en función de una condición. Usando la estructura while sólo se pasa a ejecutar su contenido si …

  2. java - do-while and while comparison - Stack Overflow

    Nov 18, 2013 · A do-while loop is an exit controlled loop which means that it exits at the end. A while loop is an entry controlled loop which means that the condition is tested at the beginning …

  3. java - Does `continue` jump to the top of a `do while`? - Stack …

    Mar 19, 2024 · Seems legitimate to me. Yes, continue will work in a do..while loop. You probably want to use break instead of continue to stop processing the users, or just remove the if null …

  4. java - When would a do-while loop be the better than a while …

    Dec 9, 2013 · Is there any time that a do-while loop would be a better style of coding than a normal while-loop? e.g. int count = 0; do { System.out.println("Welcome to Java"); count++; } …

  5. java - do-while loop using IF - Stack Overflow

    Mar 2, 2013 · I am using if condition statement with a do while loop. I want that everytime when the compiler runs the program it should print the statement in the" IF " till it reaches less then …

  6. Break DO While Loop Java? - Stack Overflow

    Sep 10, 2011 · I'm new into JAVA and I'm not sure how to break a the DO WHILE loop that I use in my code below? I thought I could enter -1 to break or all other numbers to continue the loop. …

  7. Difference between "while" loop and "do while" loop

    Sep 2, 2010 · The do while loop executes the content of the loop once before checking the condition of the while. Whereas a while loop will check the condition first before executing the …

  8. How do I exit a while loop in Java? - Stack Overflow

    Oct 31, 2011 · 2 Take a look at the Java™ Tutorials by Oracle. But basically, as dacwe said, use break. If you can it is often clearer to avoid using break and put the check as a condition of the …

  9. java - Do while loop for guessing game - Stack Overflow

    Nov 12, 2015 · 1 I am writing a simple java guessing game, the game is supposed to randomly pick a number between 1 and 100 and then after you pick the correct number it asks you if you …

  10. do while - Java do loop repeat until valid entry - Stack Overflow

    Oct 27, 2017 · I'm creating a Java project using a do-while loop to get a number from the user between 5 and 15. After this, I will create a square and triangle using the number the user …