Getting Started with Java
This is a 100% free course, but we need you to first join or login to watch this video.Alright, join or login here.
This video introduces you to the switch case statement in Java. It is replacement for writing an if else if ladder and works more compactly. You give it a variable and match all the values that the variable can have with the help of case statements. Add a default condition at the end if you want to handle the situation where the variable has a value that you did not anticipate.