java heck, если год прыгает
boolean isLeap = new GregorianCalendar().isLeapYear(2020);
//returns true
Kirk-Patrick Brown
boolean isLeap = new GregorianCalendar().isLeapYear(2020);
//returns true
import java.util.Scanner;public class Main{public static void main(String[] args){int year;System.out.println("Enter the year");Scanner sc = new Scanner(System.in);year = sc.nextInt();if (((year % 4 == 0) && (year % 100!= 0)) || (year%400 == 0))System.out.println("it is a leap year");elseSystem.out.println("it is not a leap year");}}