Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

switch java

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"
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #switch #java
ADD COMMENT
Topic
Name
6+4 =