Switch Case Accepts Byte In Java Code Example

Snippet 1
  int day = 4;
switch (day) {
  case 6:
    System.out.println("Today is Saturday");
  case 7:
    System.out.println("Today is Sunday");
    System.out.println("Looking forward to the Weekend");
// Outputs "Looking forward to the Weekend" 

Similar Snippets

Creating Java Main Method Code Example - java

Find Duplicates In Arraylist Java Code Example - java

Java Creat A Folder Code Example - java

Firestore Find Doc And Set Data Code Example - java

Create Copy Of Array From Another Array Code Example - java