Abstract
Selection structures are explained in this chapter using flowcharts, pseudocode, and the corresponding Java code. The if-then, if-then-else, and nested if structures, including if-then-else-if and if-then-if structures, are introduced. The dangling-else problem is also discussed. Logical operators are presented followed by the introduction of the case structure. Two complete programs are provided: one with objects and one without.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReference
Streib JT (2011) Guide to assembly language: a concise introduction. Springer, London
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag London
About this chapter
Cite this chapter
Streib, J.T., Soma, T. (2014). Selection Structures. In: Guide to Java. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-4471-6317-6_3
Download citation
DOI: https://doi.org/10.1007/978-1-4471-6317-6_3
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-6316-9
Online ISBN: 978-1-4471-6317-6
eBook Packages: Computer ScienceComputer Science (R0)