1.创建DateFormat对象
DateFormat df=new SimpleDateFormat("yyyy-MM-dd");//指定格式
Date date=new Date(1607616000000L);
String str_time=df.format(date);
System.out.println(str_time);
2.将date转换成String对象
Date date =new Date(1607616000000L);
DateFormat df=new SimpleDateFormat("yyyy年MM月dd日");
String str=df.format(date);//格式化
3.将String对象转换成Date
String str="2019年03月13日";
DateFormate df=new simpleFormat("yyyy年MM月dd日);
Date date=df.parse(str);