Program Control Statements
🔄 Program Control Statements in Java Control statements in Java allow you to dictate the flow of execution in your program. They can be broadly categorized into conditional, looping, and branching statements. 🧠 Types of Control Statements Conditional Statements if, else, else if: Used to make decisions in code. int a = 10, b = 20; if (a > b) { System.out.println("a is greater"); } else { System.out.println("b is greater"); } 2. **Switch Statement** * Used for multiple condition checks, simplifying `if-else if` chains. ```java int day = 3; switch (day) { case 1: System.out.println("Monday"); break; case 2: System.out.println("Tuesday"); break; default: System.out.println("Invalid day"); } Looping Statements ...