Java fundamental programs to practice: Conditional statement- switch:
Switch is one of the conditional statements which is useful in selecting one among in multiple options. Syntax: Switch(Option) { Case 1: statements….. break; Case 2: statements….. break; --------------------------- --------------------------- Case n: statements….. break; } Example for switch conditional statement is given below. Java Program to print the month using switch case: · Create a class SwitchMonth with main() function. · Get the input from user. Using the switch statement,pass the input. · Based on the input given, case stateme...