Java Selection Statements -- if, if-else and nested if-else

preview_player
Показать описание
Selection Statements in Java. Java has three types of selection statements. The if statement either performs (selects) an action, if a condition is true, or skips it, if the condition is false. The if ... else statement performs an action if a condition is true and performs a different action if the condition is false. A selection statement selects among a set of statements depending on the value of a controlling expression. The selection statements are the if statement and the switch statement, which are discussed in the following sections.
Рекомендации по теме
visit shbcf.ru