Here you can find the source of getMonthForInt(int num)
public static String getMonthForInt(int num)
//package com.java2s; //License from project: Apache License import java.text.DateFormatSymbols; public class Main { public static String getMonthForInt(int num) { String month = "wrong"; DateFormatSymbols dfs = new DateFormatSymbols(); String[] months = dfs.getMonths(); if (num >= 0 && num <= 11) { month = months[num];//from ww w .j a v a2s . c o m } return month; } }