Java   View all facts   Glossary   Help
syntactic unit > scoping unit > block > else block
Next blocknested block    Upblock    Previous blockcatch block   

else block
subjectfact 
else blockcan be omitted if there is nothing to do in the false case    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:39.0
is a subtopic of Loops and Decision Making2001-10-19 11:36:39.0
is part of if statementsource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:39.0
is a kind of blocksource: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:39.0
blockcontains several statements surrounded by braces    2001-10-19 11:36:10.0
has example
{
a =5;
b = computeSomething;
}   
2001-10-19 11:36:10.0
has layout example style preferred by Sun:
if(condition) {
// statements
}
2001-10-19 11:36:10.0
has layout example style preferred by the authors:
if(condition)
{
// statements
}
2001-10-19 11:36:10.0
has purpose to create a new scope and/or to create a compound statement2001-10-19 11:36:10.0
is used as the body of classes, loops, conditional statements and for exception handling    2001-10-19 11:36:10.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0