Get a List of Short Weekday Names in Java

Description

The following code shows how to get a List of Short Weekday Names.

Example


/*from  w ww .j a v  a  2 s .c o m*/
import java.text.DateFormatSymbols;

public class Main {
  public static void main(String[] args) {
    String[] shortWeekdays = new DateFormatSymbols().getShortWeekdays();
    for (int i = 0; i < shortWeekdays.length; i++) {
      String shortWeekday = shortWeekdays[i];
      System.out.println("shortWeekday = " + shortWeekday);
    }
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Date »




Date Get
Date Set
Date Format
Date Compare
Date Convert
Date Calculation
Date Parse
Timezone