import java.util.Scanner;
public class Test{
public static boolean isValidDate(int year, int month, int day) {
if (year < 0) {
System.out.println("年不合法");
return false;
}
if (month < 1 || month > 12) {
System.out.println("月不合法"
从键盘录入出生年、月、日,写一个判断年月日是否合法的方法,并调用
最新推荐文章于 2022-08-28 14:07:33 发布