Java View all facts Glossary Help |
syntactic unit > statement > control flow statement > decision making statement > if-else statement |
if-else statement | ||||
subject | fact |
if-else statement | can omit braces if there is only one embedded statement | |
has part else block | ||
has syntax if (boolean expression) { | ||
has example int testscore; | ||
is a subtopic of Loops and Decision Making | ||
is a kind of decision making statement | ||
decision making statement | has purpose to make a decision on which branch of code to follow in a program | |
statement | is terminated by a semicolon | |
should be not more than one line long if possible | ||
syntactic unit | has syntax rule bold = mandatory |
Kinds of if-else statement :