News Ticker

Switch Statements

Contrary to if-then-else statements, a switch statement can have numerous possible paths of execution. Switches work on primitive data types such as integer as well as enumerated types and newly introduced in Java 7 switch work with Strings. The following article Switch Statements and Gotchas shows how to use switch and identifies a few gotchas that can easily trip you up.

Leave a Reply

Discover more from Digital Transformation and Java Video Training

Subscribe now to keep reading and get access to the full archive.

Continue reading