convert month number to month name


How do I convert, say, 10 to OCT and 11 to NOV?

Who is Participating?
CEHJConnect With a Mentor Commented:
DateFormat df = new SimpleDateFormat("MMM");
int month = 10;
System.out.println(df.format(month - 1)); // 0-indexed
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.