java swtch
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}
java swtch
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}
java switch
int day = 4;
switch (day) {
case 6:
System.out.println("Today is Saturday");
break;
case 7:
System.out.println("Today is Sunday");
break;
default:
System.out.println("Looking forward to the Weekend");
}
// Outputs "Looking forward to the Weekend"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us