import java.util.Scanner; public class Test10 { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("输入年份;"); int year = input.nextInt(); System.out.println(year + " " + leapYear(year) + " a leap year."); } public static String leapYear (int year){ if (year % 4 == 0){ if (year % 100 != 0) return "is"; } if (year % 400 == 0){ return "is"; } return "is not"; } }