题目8: 2008年的第1星期星期一是几号?
import java.util.*;
public class Test {
public static void main(String[] args) {
Date date;
Calendar cal=Calendar.getInstance();
cal.set(Calendar.YEAR, 2008);
cal.set(Calendar.WEEK_OF_YEAR, 1);
cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
System.out.println("first week Monday is "+cal.getTime());
}
}
更多请看:https://blog.csdn.net/qq_44639795/article/details/103123179
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。