DisplayNameOutput.java Source code

Java tutorial

Introduction

Here is the source code for DisplayNameOutput.java

Source

import java.util.Locale;

public class DisplayNameOutput {

    public static void main(String[] argv) {

        Locale defaultLocale = Locale.getDefault();
        System.out.println(defaultLocale.getDisplayName());
        System.out.println(defaultLocale.getDisplayName(Locale.ITALIAN));
        System.out.println(defaultLocale.getDisplayName(Locale.US));
    }
}