Java Switch Statement
switch picks one case from many options using one value — day number, menu choice, grade letter. You write switch(value), then case labels.
The matching case runs until break (or the end of switch). If you forget break, the next case also runs. That is called fall-through. default is like else: no case matched.
switch is cleaner than a long else-if chain when the value is a fixed list. It works with int, String, enum, and more in modern Java.
Interviewers almost always ask about missing break. Say it out loud: without break, cases fall through.
Let's take this on the board with one tiny Main class — no extra files. Java Switch Statement — day is 2, so case 2 prints Tue. break leaves the switch — case 1 and default do not run. Remove break and Tue + Other would both print (fall-through). Start from main, go line by line, and stop at each print. That output is the proof for Switch Statement.
switch(day)
case 1 → Mon + break
case 2 → Tue + break
default → OtherExplain break and fall-through with a 3-case example.