Selection Structures

  • James T. Streib
  • Takako Soma
Part of the Undergraduate Topics in Computer Science book series (UTICS)


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.


Logical Operator Break Statement Truth Table Switch Statement Java Code 
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.


  1. 4.
    Streib JT (2011) Guide to assembly language: a concise introduction. Springer, LondonGoogle Scholar

Copyright information

© Springer-Verlag London 2014

Authors and Affiliations

  • James T. Streib
    • 1
  • Takako Soma
    • 1
  1. 1.Department of Computer ScienceIllinois CollegeJacksonvilleUSA

Personalised recommendations