Write a program in java to demonstrate the use of switch case
Answers
Answered by
4
Answer:
public class SwitchExample {
public static void main(String[] args) {
//Declaring a variable for switch expression.
int number=20;
//Switch expression.
switch(number){
//Case statements.
case 10: System.out.println("10");
Answered by
0
•SwitchExample.java
•public class SwitchExample {
•public static void main(String[] args) {
•//Declaring a variable for switch expression.
•int number=20;
•//Switch expression.
•switch(number){
•//Case statements.
•case 10: System.out.println("10");
Similar questions
Computer Science,
3 hours ago
Math,
3 hours ago
English,
6 hours ago
English,
8 months ago
Biology,
8 months ago