Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalDate;
import java.time.Month;
import java.time.MonthDay;
import java.time.Year;

public class Main {

    public static void main(String[] args) {
        Year year_2014 = Year.of(2014);
        System.out.println(year_2014);

        LocalDate year_month_day = Year.of(2014).atMonth(3).atDay(23);
        System.out.println(year_month_day);

        LocalDate year_and_day = Year.of(1974).atDay(77); // 1974-03-18
        System.out.println(year_and_day);

        System.out.println(MonthDay.of(Month.FEBRUARY, 29));

    }
}