
When You write a code different actions for different conditions. Then, You can use Conditional statements in your code to do this.
If Statement:-
If Statement executes some code when one condition is true.
ex:-
If …else Statement:-
If …. else Statement executes similar if statement when one condition is true and another condition is false.
ex:-
If…elseif…else Statement:-
If…elseif…else Statement executes different codes when for more than than two or multiple codes.
ex:-
Switch Statement:-
Switch Statement executes one of many Statement when true.
ex:-
If and nested if:-
If and nested if multiple code executes when true total statement print and when wrong then wrong statement print.
ex:-
If… else… nested…if:-




I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at WIZBRAND