Abstract
A decision is made with the if statement. It logically determines whether a conditional expression is TRUE or FALSE. For a TRUE, the program executes one block of code; a FALSE causes the execution of another (if any). The keyword else identifies the FALSE block. In Java, braces ({ }) are used to define the start and end of the block.
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Copyright information
© 1998 William Buchanan
About this chapter
Cite this chapter
Buchanan, W. (1998). Java Selection. In: Mastering Java. Macmillan Master Series. Palgrave, London. https://doi.org/10.1007/978-1-349-14772-4_2
Download citation
DOI: https://doi.org/10.1007/978-1-349-14772-4_2
Publisher Name: Palgrave, London
Print ISBN: 978-0-333-73008-9
Online ISBN: 978-1-349-14772-4
eBook Packages: EngineeringEngineering (R0)