最佳答案:Calendar c = Calendar.getInstance(); //获得当前年月日 Scanner in = new Scanner(System.in); int year