Java DateFormat get available Locales

Description

Java DateFormat get available Locales

import java.text.DateFormat;
import java.util.Locale;

public class Main {

  static public void main(String[] args) {

    Locale list[] = DateFormat.getAvailableLocales();
    for (Locale aLocale : list) {
      System.out.println(aLocale.toString());
    }//from w  ww. j  a v  a2s.c o  m
  }
}



PreviousNext

Related