The document contains two Java examples demonstrating the use of switch statements. The first example prints the number corresponding to a variable, while the second example maps month numbers to their respective names and prints the name for a given month number. Both examples include case and default statements to handle various scenarios.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
8 views
Switch Case
The document contains two Java examples demonstrating the use of switch statements. The first example prints the number corresponding to a variable, while the second example maps month numbers to their respective names and prints the name for a given month number. Both examples include case and default statements to handle various scenarios.