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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
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)