标签:com style htm diff exce imp trace [] 题目
题目10: 2008年8月27日和2008-08-24相差多少天?(视频下载) (全部书籍)
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Test {
public static void main(String[] args) {
Date date = null;
Calendar cal = Calendar.getInstance();
SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd");
try {
date = myFormatter.parse("2008-08-27");
} catch (ParseException e) {
e.printStackTrace();
}
Date mydate = null;
try {
mydate = myFormatter.parse("2008-08-24");
} catch (ParseException e) {
e.printStackTrace();
。。。。。。。。。。。。。
详情请见:http://www.mark-to-win.com/index.html?content=JavaBeginner/javaUrl.html&chapter=JavaBeginner/JavaBeginner2_web.html#DifferenceBetweenDays
标签:com style htm diff exce imp trace [] 题目
原文地址:https://www.cnblogs.com/mark-to-win/p/9692760.html