We would like to know how to get Month name from int.
import java.time.LocalDate; //from ww w . ja v a 2 s. c o m public class Main { public static void main(String[] argv) { System.out.println(getMonthName(2)); } public static String getMonthName(Integer month) { LocalDate localDate = LocalDate.of(0, month, 0); return localDate.getMonth().name(); } }
The code above generates the following result.