Skip to main content

Selection Structures

  • Chapter
  • First Online:
Guide to Java

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

  • 7603 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Reference

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics