Print out weekday names in Java
Description
The following code shows how to print out weekday names.
Example
/* www . j a v a2 s. c om*/
import java.text.DateFormatSymbols;
public class Main {
public static void main(String[] args) {
String[] weekdays = new DateFormatSymbols().getWeekdays(); // Get day names
for(String s: weekdays){
System.out.println(s);
}
}
}
The code above generates the following result.