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...thenif...then...elseswitch..case A switch statement checks if a variable is equal to a list of values. The variable in the switch statement can be a byte, short, int, or char. However, Java 7 ...

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 »