By using the below program you can find either the entered year is leap year or not

 CODE:


package com.company;

import java.util.Scanner;
public class new_program {
public static void main(String[] args) {
int year;
Scanner sc=new Scanner(System.in);

System.out.println("Enter year");
year=sc.nextInt();
if(year%4==0){
System.out.println("leap years: " +year);
}
else if(year%4!=0){
System.out.println("not a leap year:" +year);
}

}

}