Control Statements

Control statements in Java are set of instructions which manage the flow of execution of a program based on certain conditions which are used to make decisions, iterate(looping) through blocks of code multiple times, and to jump to a different part of the code based on certain conditions. The three types of control statements, namely

1) Decision-Making Statements,
2) Looping Statements (Also Called Iteration Statements),
3) Jump statements,

1) Decision Making Statements

Decision-making statements are one of the control flow statements which decide which statement to execute and when. It evaluate the boolean condition and control the execution of the block still the boolean condition provided is true.There are two types of decision-making statements in Java

1) if statement
2) switch statement

2) Loops in Java

Loop in programming concept is block of code which provides a set of instruction that keeps executing until a specific condition is met and becomes true/false to stop its execution, whether execution needs to be stopped on true or false depends on the condition that is implemented to stop its execution. In Java there are three ways to execute a loop which as follows

1) while loop
2) for loop
3) do while loop

Jump Statements

Jump statements are control statements that transfer execution control from one point to another point in the program,allowing for changes in the flow of execution. There are three Jump statements that are provided in the Java programming language:

1) break Statement
2) continue Statement
3) return Statement

Scroll to Top