October 2017
Beginner
318 pages
7h 26m
English
In this section, we're going to take a look at the switch statement, which is another way that we can modify the control flow of our program.
To begin, let's create a new project in NetBeans. At my end at least, I'm going to get rid of all these comments. To demonstrate the power of the switch statement, we're going to start by writing a program using only if blocks, then we'll convert the program to one that uses switch statements. The following are the steps for the program that uses only if blocks:
Read now
Unlock full access