Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalDate;

public class Main {
    public static void main(String[] argv) {
        LocalDate today = LocalDate.now();
        if (today.isLeapYear()) {
            System.out.println("This year is Leap year");
        } else {
            System.out.println("not a Leap year");
        }

        if (today.withYear(2016).isLeapYear()) {
            System.out.println("2016 is Leap year");
        }

    }
}