Their are 3 decision making statement in Java.
Here where ever you find the if underlined like this(if)
then it is related to statement.
1) if statement.
2) if else statement.
3) if-else-if statement.
So lets discuss one by one about each statement.
1) if statement:- if statement is used in programming for checking the given condition is true or not. If the condition in the if block is true then the block executes otherwise the programme terminates.
Lets understand it by its syntax.
Here in the syntax we have condition in the if block, if the the condition which we have putted is true then the code which is written in the block will executes otherwise the programme ends their.
2) if else statement:- if else statement is used in programming for checking the given condition is true or false. If the condition is true then the if block is executed otherwise the else block is executed.
Lets understand it by its syntax.
Here in the syntax a condition is given in the if statement, if the condition is true then the if block will be executed otherwise the else block will be executed as the condition is false in the if block.
3) if-else-if statement:- if-else-if statement is used in programming language for checking given condition. If the condition is true then the if block will be executed, if the condition is false but the condition present in the else if block is true then the else if block will be executed otherwise else block will be executed.
Lets understand it by its syntax.
Here in the syntax a condition is given in if block if the condition is true then the if statement will get executed, but if the condition is false then the compiler will move toward else if block, if the condition is true then the else if statement will get executed but if both the condition are false then else block will get executed.
Wow man
ReplyDeleteJamao kara lagla mantat ravi tu tar
ReplyDeleteWell done keep it up bhai๐๐๐
ReplyDeleteBro my concept are cleared after reading your blogs keep making blog like this๐๐keep it up
ReplyDeleteThank you so much for your support ❤️
DeleteBro make blog on cpp
ReplyDeleteYes bro definately I will make firstly my main focus is on java programming.
DeleteAbe ravya mahol kru rahila Tu tr๐๐ค๐ค
ReplyDeleteRavi sir yancha Vijay aso yenarya nivadnuk mdhe๐๐ช
ReplyDeleteOP Bhai๐ค๐ค๐๐ช
ReplyDeleteminecraft coding Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info.
ReplyDelete