Java : Switch Statement - Exercises and Solution


1. Write a program to read a weekday number and print weekday name using switch statement

View Solution

2. Write a program to read gender(M/F) and print the corresponding gender using a switch statement

View Solution

3. Write a program to Check whether a character is a vowel or consonant using switch statement

View Solution

4. Write a program to Check whether the number is even or odd using switch statement

View Solution

5. Write a program to Find the number of days in a month using a switch statement

View Solution

6. Write a program to create simple calculator using switch Statement

View Solution

7. Write a program to print remark according to the grade obtained using switch statement

View Solution

8. Write a program to Menu driven program using switch statement ( Find addition, subtraction, multiplication and division of to integer numbers )

View Solution

9. Write a program to check whether a person is eligible to vote or Not using switch statement

View Solution

10. Write a program to find the Maximum of Two Numbers using switch statement

View Solution



Basic Programs