题目5: 巧妙利用SimpleDateFormat求出: 2008-11-11是星期几?(视频下载) (全部书籍)
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Test {
public static void main(String[] args) {
SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd");
Date mydate = null;
try {
mydate= myFormatter.parse("2008-11-11");
} catch (ParseException e) {
e.printStackTrace();
}
SimpleDateFormat formatter4 = new SimpleDateFormat("E");
String mydate3=formatter4.format(mydate);
。。。。。。。。。。。。。。。。。。。。
详情请见:http://www.mark-to-win.com/index.html?content=JavaBeginner/javaUrl.html&chapter=JavaBeginner/JavaBeginner2_web.html#CalculateWhatDay
原文地址:https://www.cnblogs.com/mark-to-win/p/9692700.html