fork download
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		System.out.println(ChronoUnit.YEARS.between(LocalDate.MIN, LocalDate.MAX)); //1.999.999.998
	}
}
Success #stdin #stdout 0.14s 2184192KB
stdin
Standard input is empty
stdout
1999999998