import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.text.ParseException;
import java.util.Locale;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) throws ParseException {
String dt = "20211031";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Calendar c = Calendar.getInstance();
c.setTime(sdf.parse(dt));
c.add(Calendar.DATE, 1);
SimpleDateFormat dateName = new SimpleDateFormat("dd MMMM yyyy");
String tglPlusOne = dateName.format(c.getTime());
System.out.println(tglPlusOne);
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: