continue keyword in Java

” continue “ keyword is used to stop the execution of current iteration and start the execution of next iteration in loops such as for loop , while loop. The statements after the continue keyword won’t be executed. Example with for loop public class MainProgram {     public static void main(String[] args)     […]

Share this article on

do keyword in Java

The ” do ” keyword specifies a loop whose condition is checked at the end of each iteration. Syntax is as below do  {         <statements>  } while (boolean_condition); do { <statements> } while (boolean_condition); The do-while is a loop structure which repeatedly executes the statements until a condition becomes false. In […]

Share this article on
< Previous Next >