Computer Science, asked by rathoremanvi6, 6 hours ago

Write a program in java to demonstrate the use of switch case​

Answers

Answered by XxKingAdityaxX
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 itzpriya7
0

answer

•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