Android Studio – Convert a String field to Date

Hello, I use a String field called "fecha_ini" and that contains a date in the following format "01-02-2018". What I need to add is to add a day to that date, but if I'm not mistaken, I need to run it from String to Date.
To do the casting, I tried the following, but it throws me an error:

                fecha_ini = "01-02-2018";

try
{
String date = date_ini;
SimpleDateFormat format1 = new SimpleDateFormat ("dd-MM-yyyy");
java.util.Date dateOjb = format1.parse (date);
SimpleDateFormat format2 = new SimpleDateFormat ("dd / mm / yyyy");
newDate = format2.format (dateOjb);
Toast.makeText (this, newDate, Toast.LENGTH_SHORT) .show ();
} catch (ParseException e) {
}

The error is as follows:

Caused by: java.lang.NullPointerException: Attempt to call the virtual method int java.lang.String.length () & # 39; on a null object reference

Am I doing it correctly or is there another easier way to convert the "date_ini" field to Date? To then work with the result and add days.

Thank you so much.