013-003-006
LocalDate Class: Create Specific Date
Easy
Problem Description
LocalDate Class: Create Specific Date
Learning Objective: Create specified date with LocalDate.of
Create program creating date object from input year/month/day. Create date with LocalDate.of(year, month, day) and get day of week with getDayOfWeek().
Input
Line 1: Year (integer)
Line 2: Month (integer)
Line 3: Day (integer)
Output
Date: [yyyy-MM-dd]
Day of week: [day number 1-7]
```java
## Examples
### Example 1: Basic date
Input:
```java
2025
10
30
```java
Output:
```java
Date: 2025-10-30
Day of week: 4
```java
### Example 2: New year date
Input:
```java
2024
1
1
```java
Output:
```java
Date: 2024-01-01
Day of week: 1
```java
### Example 3: Year end date (boundary)
Input:
```java
2025
12
31
```java
Output:
```java
Date: 2025-12-31
Day of week: 3
Test Cases
※ Output examples follow programming industry standards
Input:
2025 10 30
Expected Output:
Date: 2025-10-30 Day of week: 4
Input:
2024 1 1
Expected Output:
Date: 2024-01-01 Day of week: 1
Input:
2025 12 31
Expected Output:
Date: 2025-12-31 Day of week: 3
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 9 free executions remaining
