Get a List of Short Month Names in Java
Description
The following code shows how to get a List of Short Month Names.
Example
// w w w.ja v a 2 s . c om
import java.text.DateFormatSymbols;
public class Main {
public static void main(String[] args) {
String[] shortMonths = new DateFormatSymbols().getShortMonths();
for (int i = 0; i < shortMonths.length; i++) {
String shortMonth = shortMonths[i];
System.out.println("shortMonth = " + shortMonth);
}
}
}
The code above generates the following result.