import java.time.LocalDate;
import java.time.MonthDay;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoField;
import java.util.Locale;

class Main {
    public static void main(String args[]) {
        // If your string is in --MM-dd format
        MonthDay monthDay = MonthDay.parse("--03-10");
        // If you want the current year, replace 1 with Year.now().getValue()
        LocalDate date = monthDay.atYear(1);
        System.out.println(date);

        // If your string is in MM-dd format
        DateTimeFormatter monthDayFormatter = DateTimeFormatter.ofPattern("MM-dd", Locale.ENGLISH);
        monthDay = MonthDay.parse("03-10", monthDayFormatter);
        // If you want the current year, replace 1 with Year.now().getValue()
        date = monthDay.atYear(1);
        System.out.println(date);

        // An alternative solution
        DateTimeFormatter dtf = new DateTimeFormatterBuilder()
                .appendPattern("MM-dd")
                // If you want the current year, replace 1 with Year.now().getValue()
                .parseDefaulting(ChronoField.YEAR, 1)
                .toFormatter(Locale.ENGLISH);
        date = LocalDate.parse("03-10", dtf);
        System.out.println(date);
    }
}