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.Period;

public class Main {
    public static void main(String[] argv) {
        LocalDate today = LocalDate.now();
        LocalDate java8Release = LocalDate.of(2014, Month.MARCH, 14);
        Period period = Period.between(java8Release, today);
        System.out.println("Period between today and Java 8 release : " + period);
        System.out.println("Period between Java 8 release and today : " + Period.between(today, java8Release));

    }
}