We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a21cb4 commit 38cf7aeCopy full SHA for 38cf7ae
Java/Introduction/Java Date and Time/Solution.java
@@ -0,0 +1,19 @@
1
+import java.util.Scanner;
2
+import java.time.LocalDate;
3
+
4
+public class Solution {
5
6
+ public static String getDay(String day, String month, String year) {
7
+ LocalDate date = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day));
8
+ return date.getDayOfWeek().name();
9
+ }
10
11
+ public static void main(String[] args) {
12
+ Scanner in = new Scanner(System.in);
13
+ String month = in.next();
14
+ String day = in.next();
15
+ String year = in.next();
16
17
+ System.out.println(getDay(day, month, year));
18
19
+}
0 commit comments