DateFormatSymbols getWeekdays() Method in Java with Examples
The getWeekdays() Method of DateFormatSymbols class in Java is used to get the name of the weekdays of the calendar in a string format.
public String getWeekdays()
Parameters: The method does not take any parameters.
Return Values: The method returns the name of the weekdays in a string format.
Below programs illustrate the use of getWeekdays() method.
Day 1 = Sunday Day 2 = Monday Day 3 = Tuesday Day 4 = Wednesday Day 5 = Thursday Day 6 = Friday Day 7 = Saturday
Day 1 = Sunday Day 2 = Monday Day 3 = Tuesday
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.