Hi just learning java lately as a beginner and this fall through thing kinda confused me.
So people say that if you don't add a "break" statement in switch, it will automatically flow through all cases.
case 2:
// Do Something A
case 3:
// Do Something B
break;
However, shouldn't case mean something like "if found the target, then do?". In that case, even if i don't put a break after case 2, that integer 2 still doesn't meet condition case 3 right? So why would it automatically flow through to do something B too even though it doesn't meet the condition "case 3"?
Thanks for helping a newbie out!!