package com.sudhirtheindian2.java123;
public class Switch {
public static void main(String[] args) {
// How to use switch case statement in java
// switch is a multiple choice decision making selection
// statement , it used when we want to select
// only one case out of multiple cases
// syntax
// switch (expression){
// case 1:
// statement 1
// break;
// case 2:
// statement 2
// case 3:
// statement 3
// case m :
// statement m;
//
//
// default:
// default ;
switch (35){
case 1:
System.out.println("this is right value");
break;
case 2:
System.out.println("this is very good");
break;
case 3:
System.out.println("this is india");
break;
default:
System.out.println("this is end");
}
}
}
टिप्पणियाँ
एक टिप्पणी भेजें