Break and ContinueBreak and Continue are the 2 keywords that are mostly used in loop statements. Break Statement As the name suggests Break keyword is used to break from the loop. Example 1 : Keep Entering the Number Until It is the multiple of 10. import java.util.Sc...Jun 7, 2023 · 2 min readjavacodewithaditya.hashnode.dev
Do While Loops In JavaDo while loop is a unique way to write the while loop code the syntax of Do While loop is kind of unique. Syntax do{ // Statement }while(conditionState); So, what is this "do"? why we are writing this? because whenever we write code in the do. Then...May 13, 2023 · 1 min readjavacodewithaditya.hashnode.dev
For LoopFor loop is the same as the while loop. It is used to repeat a block of code again and again. But the syntax of the for loop is different quite different from the while loop. Syntax for(initializationState; conditionState; updationState) { ...Apr 26, 2023 · 2 min readjavacodewithaditya.hashnode.dev
While Loops In JavaSo while loop is used to repeat a specific code again and again and again. While loop consists of a condition. And while the loop will keep repeating itself until or unless the condition written in parenthesis is true. Like the condition can be Examp...Apr 25, 2023 · 2 min readjavacodewithaditya.hashnode.dev