//1.String类型时间转换为时间类型的时间
String str="2019/06/19";
DateFormat format= new SimpleDateFormat("yyyy/MM/dd");
Date date = null;
try {
date = format.parse(str);
} catch (ParseException e) {
e.printStackTrace();
}
//2.获取指定时间对应的星期
SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
String week = sdf.format(date);
System.out.println(week);