DateFormatSymbols getShortMonths() Method in Java with Examples
The getShortMonths() Method of DateFormatSymbols class in Java is used to get the short name of the months of the calendar in a string format.
public String getMonths()
Parameters: The method does not take any parameters.
Return Values: The method returns the short name of the months in a string format.
Below programs illustrate the use of getShortMonths() method.
Month = Jan Month = Feb Month = Mar Month = Apr Month = May Month = Jun Month = Jul Month = Aug Month = Sep Month = Oct Month = Nov Month = Dec
Month 0 = Jan Month 1 = Feb Month 2 = Mar Month 3 = Apr Month 4 = May Month 5 = Jun
My Personal Notes arrow_drop_up
Please Login to comment...