Commit 30a0607
committed
feat: Demonstrate switch statement variations for fruit and day categorization
🧠 Logic:
- Takes user input and shows two switch-case use cases:
1. **Commented block**: Categorizes fruits with switch expression syntax (`->`) and default fallback.
2. **Active block**: Classifies numeric days into "Weekday" and "Weekend" using both traditional and enhanced switch syntax.
- Uses modern Java syntax for clean and concise control flow.
Signed-off-by: Somesh diwan <[email protected]>1 parent 97efc34 commit 30a0607
1 file changed
+1
-3
lines changedLines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | 45 | | |
48 | 46 | | |
0 commit comments