Here you can find the source of getMonthNames()
public static String[] getMonthNames()
//package com.java2s; import static java.util.Calendar.*; import java.text.DateFormatSymbols; import java.util.Locale; public class Main { public static String[] getMonthNames(Locale l, int len) { String[] s;/*from w w w. j a v a2s . c o m*/ if (len == SHORT) s = new DateFormatSymbols(l).getShortMonths(); else s = new DateFormatSymbols(l).getMonths(); return s; } public static String[] getMonthNames() { return getMonthNames(Locale.getDefault(), LONG); } public static String[] getShortMonths() { return getMonthNames(Locale.getDefault(), SHORT); } }