Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalDate;
import java.time.Month;

public class Main {
    public static void main(String[] args) {
        // Get the current local date
        LocalDate localDate1 = LocalDate.now();
        System.out.println(localDate1);
        // Create a  local date
        LocalDate localDate2 = LocalDate.of(2014, Month.JUNE, 21);
        System.out.println(localDate2);
        // 10000  days after the epoch date 1970-01-01
        LocalDate localDate3 = LocalDate.ofEpochDay(10000);
        System.out.println(localDate3);
    }
}