Break keyword in Switch statement
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner number = new Scanner(System.in); int day = number.nextInt(); switch(day) { case 1: System.out.println("Monday"); break; case 2: System.out.println("Tuesday"); case 3: System.out.println("Wednesday"); break; } } } for instance i want to put the input as 2, and there's no "break" in case 2. I thought it will only print the case which is the same as the expression we want so why the 3rd case is printed too even tho it's not the same??