java.time
On Java 8 and later, the java.time package makes this pretty much automatic. (Tutorial)
Assuming String
input and output:
import java.time.LocalDate;
public class DateIncrementer {
static public String addOneDay(String date) {
return LocalDate.parse(date).plusDays(1).toString();
}
}