I tried this way but it throws an exception.
DateFormat date = new SimpleDateFormat("YYYY-MM-DDThh:mm:ssZ");
Date result = date.parse(time);
I am getting this exception:
java.text.ParseException: Unparseable date: "2018-06-19T05:50:31.000+0000"
How can I parse this date in Java?