(Analysis method for determining leap: be divisible by 4 and can not be divisible by 400 and divided by 100)
public static void main(String[] args) {
System.out.println ( "Please enter the year");
Scanner scanner=new Scanner(System.in);
int year=scanner.nextInt();
if(((year%4)==0&&(year%100)!=0)||(year%400)==0) {
System.out.println ( "the year you enter" + year + "is a leap year");
}else {
System.out.println ( "the year you enter" + year + "is not a leap year");
}
scanner.close();
}