DisplayVariantOutput.java Source code

Java tutorial

Introduction

Here is the source code for DisplayVariantOutput.java

Source

import java.util.Locale;

public class DisplayVariantOutput {

    public static void main(String[] argv) {

        Locale defaultLocale = Locale.getDefault();
        System.out.println(defaultLocale.getDisplayVariant());
        System.out.println(defaultLocale.getDisplayVariant(Locale.US));
        System.out.println((new Locale("en", "US", "WIN_TX_Austin")).getDisplayVariant());
    }
}