import java.util.*; import java.text.*; public class June { public static void main(String args[]) { DateFormatSymbols symbols = new DateFormatSymbols(Locale.US); String months[] = symbols.getMonths(); int j = -1; for (int i=0, n=months.length; i < n; i++) { if (months[i].equals("June")) { j = i; break; } } System.out.println("June month = " + j); } }