Skip to main content

Selection

  • Chapter
  • First Online:
Java in Two Semesters

Part of the book series: Texts in Computer Science ((TCS))

  • 209k Accesses

Abstract

Outcomes:

By the end of this chapter you should be able to:

  • explain the difference between sequence and selection;

  • use an if statement to make a single choice in a program;

  • use an if…else statement to make a choice between two options in a program;

  • use nested if…else statements to make multiple choices in a program;

  • use a switch statement to make multiple choices in a program.

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 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 79.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Quentin Charatan .

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Charatan, Q., Kans, A. (2019). Selection. In: Java in Two Semesters. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-99420-8_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-99420-8_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-99419-2

  • Online ISBN: 978-3-319-99420-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics