Answers for "switch java defualt"

83

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"
Posted by: Guest on March-11-2020
1

java switch tutorial

For details about Java Switch tutorial visit website:
https://www.allaboutjava.com/2021/07/java-switch-statements.html
Posted by: Guest on July-21-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language