By using the if and if-else statement in java program we use if to show a block of code to be done if a calculated condition is true. Use else to show a block of code to be done if a similar condition is false. Use else if to show another condition to test, if the main condition is false.
visit us :- https://w3codeworld.com/
4622 Dogwood Road Phoenix, Arizona 85034, Phoenix, Arizona, United States