====================================================
String ---- > Date
String dateString = "2019-10-11 08:34:27" ;
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
Date date1 = sdf.parse(dateString);
====================================================
Date ---- > String
Date date = new Date();
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
String dateString = sdf.format(date);
====================================================
Date ---- > Calendar
Date date = new Date();
Calendar c = Calendar.getInstance();
c.setTime(date);
====================================================
Calendar ---- > Date
Calendar calendar = Calendar.getInstance();
Date date = calendar.getTime();
====================================================