switch case using->
package code.mypack;
public class src {
public static void main(String[] args) {
int a=10;
switch (a) {
case 10->
{
System.out.println("be happy");
}
case 12->{
System.out.println("enjoy!!!");
}
}
}
}
Comments
Post a Comment