forked from riya2001-cloud/java-hacktober
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDayToday.java
37 lines (32 loc) · 840 Bytes
/
DayToday.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.time.*;
public class DayToday {
public static void main(String[] args) {
LocalDate myDate = LocalDate.now();
DayOfWeek day = myDate.getDayOfWeek();
String fDay ="";
switch (day) {
case SUNDAY:
fDay = "Sunday";
break;
case MONDAY:
fDay = "Monday";
break;
case TUESDAY:
fDay = "Tuesday";
break;
case WEDNESDAY:
fDay = "Wednesday";
break;
case THURSDAY:
fDay = "Thursday";
break;
case FRIDAY:
fDay = "Friday";
break;
case SATURDAY:
fDay = "Saturday";
break;
}
System.out.println("Todays is " + fDay);
}
}