Java.util.Locale.getDisplayVariant() 方法


Java.util.Locale.getDisplayVariant() 方法

package com.codingdict;

import java.util.*;

public class LocaleDemo {
   public static void main(String[] args) {

      // create a new locale
      Locale locale = new Locale("ENGLISH", "US", "WIN");

      // print locale
      System.out.println("Locale:" + locale);

      // print display variant for locale - based on inLocale
      System.out.println("Variant:" + locale.getDisplayVariant());
   }
}