Java DateFormatSymbols create for en-US Locale

Description

Java DateFormatSymbols create for en-US Locale

import java.text.DateFormatSymbols;
import java.util.Locale;

public class Main {
  public static void main(String[] args) throws Exception {
    DateFormatSymbols symbols = new DateFormatSymbols(new Locale("en", "US"));
    String[] defaultDays = symbols.getShortWeekdays();

    for (int i = 0; i < defaultDays.length; i++) {
      System.out.print(defaultDays[i] + "  ");
    }//  w  ww  . j a va 2s  .co  m

  }
}



PreviousNext

Related