In Java, a switch statement is used to execute different blocks of code depending on the value of a single variable or expression. It is a convenient way to avoid ...
📝 Important Notes – break & continue (Java) 🔹 break • Immediately terminates the loop • Control moves to the statement after the loop • Can be used in for, while, do-while, and switch • Also ...