Conditional statement:
There are three types of condition statement .They are if , else if and else statement used to control the program based on certain conditions.
if statement:
The if statement execute a block code if a specified condition is true.
syntax:
if(condition){
}
if else statement:
The if else statement provides an alternative block of code to execute when the condition is false.
syntax:
if(condition){
}else{
}
else if ladder:
The structure allows checking multiple conditions.
syntax:
if(condition){
}else if (condition){
}else{
}
Top comments (0)