import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) throws ParseException{
        String dt = "2021-02-18";  // Start date
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Calendar c = Calendar.getInstance();
        c.setTime(sdf.parse(dt));
        c.add(Calendar.MONTH, 12);  // number of days to add
        dt = sdf.format(c.getTime());  // dt is now the new date
        System.out.println(dt);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: