26 - If, If Else, Else If Statements in Java (Hindi/Urdu)
LIKE, SHARE & SUBSCRIBE if statement is a conditional selection statement in Java language. This type of statements are used to redirect the execution of our java code and it is totally depended on the outcome of the condition which we have inserted in the if conditional block. There are 4 type of if statements in Java. 1) if conditional statement 2) if else conditional statement 3) else if conditional statement 4) nested if conditional statement Here else condition is optional, but we must insert else block in our Java code so that we can trace the execution order and can determine the outcome of condition we mentioned in "if" block. We can insert an "if" block in another "if" block and that is known as nested if. Else If ladder is just like nested "ifs" and it is a program construct which we use if we are comparing many conditions at a single time. We can only declare a single statement after "if" and "else" statement and we cannot add a declarative statement after "if" and "else" statement. If we wanna add a declarative statement after "if" and "else" statement, then we must wrap our code in blocks. Logical Operators in Java : https://youtu.be/t4P9zvsm40I Relational Operators in Java : https://youtu.be/y8AJp7VCw84 Thanks for watching & stay tuned. Like us on Facebook - https://goo.gl/y7oxYc Follow us on Twitter - https://goo.gl/UKmTfn
Download
0 formatsNo download links available.