Java Flow Control

Java do-while Loop

In this article, you will learn about the do-while loop and how to create do-while loop in Java programming. Loops in Java are used when we want to execute a block of statements repeatedly until a specific condition is met(condition is false). Java do-while Loop Java do-while loop is an exit-control loop, which means unlike while loop, …

Java do-while Loop Read More »

Java switch Statement

In this article, you will learn to use switch statement to control the flow of your program’s execution. Java switch Statement When we want to execute a particular block of code/statements among many blocks we can use switch statement. Syntax // switch statement switch(expression/variable) { // case statements // values must be of same type …

Java switch Statement Read More »

Java if…else

In this article, you will learn to use selection statements if, if-else, if-else-if to control the flow of execution of a program based on certain conditions. Selection statements also known as conditional statements allows a program to test several conditions, and execute instructions based on which condition is true. The conditional statements: if statement if-else …

Java if…else Read More »