Home » Java Basics » switch statement

switch statement

Java Switch-Case Example

In this post, we feature a comprehensive Java Switch-Case Example. Java provides decision making statements so as to control the flow of your program. These statements are: if...then if...then...else switch..case In this example, we will show how to use the Java Switch-Case statement. A switch statement checks if a variable is equal to a list of values. The variable in ...

Read More »

Free Flowing Switch Statement

With this example we are going to demonstrate how to create a free flowing switch statement. A free flowing switch statement is a switch statement where break statement is not specified, thus all cases after the matching one (including the default) will be executed. In short, to create a free flowing switch statement you should: Create a switch statement that evaluates ...

Read More »