Write a program that displays all the leap years, ten per line, in the twenty-first century (from 2001 to 2100), separated by exactly one space.
Breaking it down
Java 8 time api has a neat way to determine leap years. Using Year.isLeap checks if the year is a leap year, according to the ISO proleptic calendar system rules. Creating a range of years from IntStream we can print the items from the stream.