public class Demo01 {
public static void main(String[] args) throws ParseException {
Scanner scanner = new Scanner(System.in);
System.out.println("输入年(例:1998)");
int yyyy=scanner.nextInt();
System.out.println("输入月(例:09)");
int MM=scanner.nextInt();
System.out.println("输入日(例:09)");
int dd=scanner.nextInt();
String date1=String.valueOf(yyyy)+"-"+String.valueOf(MM)+"-"+String.valueOf(dd);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//SimpleDateFormat带参实例化
Calendar calendar = Calendar.getInstance();//Calendar实例化
Date date = sdf.parse(date1);//SimpleDateFormat格式化String变 Date类
calendar.setTime(date);//Date---->日历类
int days=calendar.get(Calendar.DAY_OF_YEAR);//日历类当年第几天
int sum=(yyyy-1990-1)*365+days;
switch (sum%5){
case 1:
System.out.println("打渔");
break;
case 2:
System.out.println("打渔");
break;
case 3:
System.out.println("打渔");
break;
case 4:
System.out.println("晒网");
break;
case 0:
System.out.println("晒网");
break;
}
}