MCPcopy Create free account
hub / github.com/Manvityagi/PW-Skills-Java-Course-Codes / Day

Class Day

Lecture 06_Conditionals/src/Day.java:3–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import java.util.Scanner;
2
3public class Day {
4 public static void main(String[] args) {
5 Scanner sc = new Scanner(System.in);
6 int day = sc.nextInt();
7
8 switch (day){
9 case 1:
10 System.out.println("MONDAY");
11 break;
12 case 2:
13 System.out.println("TUESDAY");
14 break;
15 case 3:
16 System.out.println("WEDNESDAY");
17 break;
18 case 4:
19 System.out.println("THURSDAY");
20 break;
21 case 5:
22 System.out.println("FRIDAY");
23 break;
24 case 6:
25 System.out.println("SATURDAY");
26 break;
27 case 7:
28 System.out.println("SUNDAY");
29 break;
30 default:
31 System.out.println("Invalid Day Number");
32 }
33 }
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected