013-003-001
LocalDate Class: Date Creation
Easy
Problem Description
LocalDate Class: Date Creation
Learning Objective: Create date with LocalDate.of()
Create program that builds date object from specified year, month, day. Use LocalDate class of method to create date.
Input
Line 1: Year (integer)
Line 2: Month (integer)
Line 3: Day (integer)
Output
Date: [yyyy-MM-dd]
Year: [year]
Month: [month]
Day: [day]
Test Cases
※ Output examples follow programming industry standards
Input:
2025 1 15
Expected Output:
Date: 2025-01-15 Year: 2025 Month: 1 Day: 15
Input:
2024 2 29
Expected Output:
Date: 2024-02-29 Year: 2024 Month: 2 Day: 29
Input:
2025 12 31
Expected Output:
Date: 2025-12-31 Year: 2025 Month: 12 Day: 31
❌ 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
